-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
36 lines (34 loc) · 908 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
33
34
35
36
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: {
"block-manager": "./src/js/block-manager.js",
"block-manager-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(),
/**
* Report css warnings and errors to the command line.
*
* @see https://www.npmjs.com/package/stylelint-webpack-plugin
*/
new StylelintPlugin(),
],
};