forked from htmlburger/carbon-fields
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.blocks.js
36 lines (34 loc) · 956 Bytes
/
webpack.blocks.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
/**
* External dependencies.
*/
const merge = require( 'webpack-merge' );
/**
* Internal dependencies.
*/
const base = require( './webpack.base' );
const paths = require( './paths' );
const wpPackages = require( './wp-packages' );
module.exports = [
merge( base, {
entry: {
blocks: './packages/blocks/index.js'
},
output: {
path: paths.gutenbergBuildPath,
},
externals: Object.assign( {}, wpPackages.externals, {
'react': [ 'cf', 'vendor', 'react' ],
'react-dom': [ 'cf', 'vendor', 'react-dom' ],
'nanoid': [ 'cf', 'vendor', 'nanoid' ],
'immer': [ 'cf', 'vendor', 'immer' ],
'@wordpress/api-fetch': [ 'wp', 'apiFetch' ],
'@wordpress/components': [ 'wp', 'components' ],
'@wordpress/blocks': [ 'wp', 'blocks' ],
'@wordpress/editor': [ 'wp', 'editor' ],
'@wordpress/i18n': [ 'wp', 'i18n' ],
'@wordpress/date': [ 'wp', 'date' ],
'@carbon-fields/core': 'cf.core',
'lodash': [ 'lodash' ]
} )
} )
];