-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
webpack.config.js
32 lines (31 loc) · 891 Bytes
/
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
const defaults = require('@wordpress/scripts/config/webpack.config');
const ESLintPlugin = require('eslint-webpack-plugin');
const StylelintPlugin = require('stylelint-webpack-plugin');
/**
* WP-Scripts Webpack config.
*
* @see https://developer.wordpress.org/block-editor/packages/packages-scripts/#provide-your-own-webpack-config
*/
module.exports = {
...defaults,
externals: {
react: 'React',
'react-dom': 'ReactDOM',
},
entry: {
'instant-images': './src/js/index.js',
'media-modal/index': './src/js/media-modal.js',
'plugin-sidebar/index': './src/js/plugin-sidebar.js',
'block/index': './src/js/editor/block/index.js',
'admin/index': './admin/src/js/admin.js',
},
plugins: [
...defaults.plugins,
/**
* Report JS warnings and errors to the command line.
*
* @see https://www.npmjs.com/package/eslint-webpack-plugin
*/
new ESLintPlugin(),
],
};