Skip to content

Commit 2bd7a9d

Browse files
committed
webpack config updated
1 parent b7206ed commit 2bd7a9d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
"devDependencies": {
2525
"@babel/core": "^7.3.4",
2626
"@babel/preset-env": "^7.3.4",
27-
"@codexteam/icons": "^0.0.5",
2827
"babel-loader": "^8.0.5",
2928
"css-loader": "^1.0.0",
3029
"raw-loader": "^3.1.0",
3130
"style-loader": "^0.21.0",
3231
"webpack": "^4.29.5",
3332
"webpack-cli": "^3.2.3"
33+
},
34+
"dependencies": {
35+
"@codexteam/icons": "^0.0.5"
3436
}
3537
}

src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/**
22
* Build styles
33
*/
4-
require('./index.css').toString();
4+
import './index.css';
5+
import { IconInlineCode } from '@codexteam/icons'
56

67
/**
78
* Inline Code Tool for the Editor.js
@@ -166,7 +167,7 @@ class InlineCode {
166167
* @return {string}
167168
*/
168169
get toolboxIcon() {
169-
return require('@codexteam/icons').IconInlineCode;
170+
return IconInlineCode;
170171
}
171172

172173
/**

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module.exports = {
3636
publicPath: '/',
3737
filename: 'bundle.js',
3838
library: 'InlineCode',
39-
libraryTarget: 'umd'
39+
libraryTarget: 'umd',
40+
libraryExport: 'default'
4041
}
4142
};

0 commit comments

Comments
 (0)