-
Notifications
You must be signed in to change notification settings - Fork 10
/
webpack.config.js
32 lines (28 loc) · 712 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
// Import the original config from the @wordpress/scripts package.
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const path = require( 'path' );
const postType = {
...defaultConfig,
externals: {
...defaultConfig.externals,
codemirror: 'wp.CodeMirror',
},
entry: './app/post-type/App.js',
output: {
filename: 'post-type.js',
path: path.resolve( __dirname, 'assets/build' )
},
};
const taxonomy = {
...defaultConfig,
externals: {
...defaultConfig.externals,
codemirror: 'wp.CodeMirror',
},
entry: './app/taxonomy/App.js',
output: {
filename: 'taxonomy.js',
path: path.resolve( __dirname, 'assets/build' )
},
};
module.exports = [ postType, taxonomy ];