-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
74 lines (52 loc) · 1.48 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// const defaultGutenbergConfig = require("@wordpress/scripts/config/webpack.config");
// const MiniCssExtractPlugin = require('mini-css-extract-plugin');
// const IgnoreEmitPlugin = require('ignore-emit-webpack-plugin');
const path = require( 'path' );
// var glob = require('glob');
var public = {
mode: "production",
watch: true,
entry: path.resolve( __dirname, 'assets/scripts/src/public.js' ),
output: {
filename: 'public.js',
path: path.resolve( __dirname, 'assets/scripts/dist/' ),
},
};
var admin = {
mode: "production",
watch: true,
entry: path.resolve( __dirname, 'assets/scripts/src/admin.js' ),
output: {
filename: 'admin.js',
path: path.resolve( __dirname, 'assets/scripts/dist/' ),
},
};
var editor = {
mode: "production",
watch: true,
entry: path.resolve( __dirname, 'assets/scripts/src/editor.js' ),
output: {
filename: 'editor.js',
path: path.resolve( __dirname, 'assets/scripts/dist/' ),
},
};
// var gutenbergConfig = {
// ...defaultGutenbergConfig,
// watch: true,
// entry: {
// index: path.resolve('./blocks/condition/index.js'),
// style: path.resolve('./blocks/condition/style.css'),
// editor: path.resolve('./blocks/condition/editor.css'),
// },
// output: {
// path: path.resolve(__dirname, 'blocks/dist/'),
// },
// plugins: [
// ...defaultGutenbergConfig.plugins,
// new MiniCssExtractPlugin({
// filename: '[name].css',
// }),
// new IgnoreEmitPlugin(['editor.js', 'style.js']),
// ],
// };
module.exports = [public, admin, editor];