-
Notifications
You must be signed in to change notification settings - Fork 10
/
webpack.config.js
35 lines (29 loc) · 1.15 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const path = require( 'path' );
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const RemoveEmptyScriptsPlugin = require( 'webpack-remove-empty-scripts' );
module.exports = {
...defaultConfig,
entry: {
'block-visibility-editor' : path.resolve( process.cwd(), 'src/editor.js' ),
'block-visibility-settings' : path.resolve( process.cwd(), 'src/settings.js' ),
'block-visibility-editor-styles': path.resolve( process.cwd(), 'src/styles/editor.scss' ),
'block-visibility-contextual-indicator-styles': path.resolve( process.cwd(), 'src/styles/contextual-indicators.scss' ),
'block-visibility-setting-styles' : path.resolve( process.cwd(), 'src/styles/settings.scss' ),
},
output: {
filename: '[name].js',
path: path.resolve( process.cwd(), 'build/' ),
},
module: {
...defaultConfig.module,
rules: [
...defaultConfig.module.rules,
// Add additional rules as needed.
]
},
plugins: [
...defaultConfig.plugins,
// Add additional plugins as needed.
new RemoveEmptyScriptsPlugin(),
],
};