-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
49 lines (43 loc) · 1.1 KB
/
webpack.config.js
File metadata and controls
49 lines (43 loc) · 1.1 KB
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
// Import the original config from the @wordpress/scripts package.
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const path = require( 'path' );
const webpack = require( 'webpack' );
const externals = {
...defaultConfig.externals,
'jquery': 'jQuery',
'jquery-ui': 'jQuery',
codemirror: 'wp.CodeMirror',
clipboard: 'ClipboardJS',
};
// Main Meta Box Builder app.
const main = {
...defaultConfig,
entry: './assets/app/App.js',
output: {
path: path.resolve( 'assets/build' ),
filename: 'app.js'
},
externals,
};
// Settings page app.
const settingsPage = {
...defaultConfig,
entry: './src/Extensions/SettingsPage/app/App.js',
output: {
path: path.resolve( 'src/Extensions/SettingsPage/build' ),
filename: 'settings-page.js'
},
externals,
};
// Relationships app.
const relationships = {
...defaultConfig,
entry: './src/Extensions/Relationships/app/App.js',
output: {
path: path.resolve( 'src/Extensions/Relationships/build' ),
filename: 'relationships.js'
},
externals,
};
module.exports = [ main, settingsPage, relationships ];
// module.exports = [ main ];