Add a custom jsonpFunction to prevent collisions with other splitChunks-using projects (https://github.com/woocommerce/woocommerce-blocks/pull/520)
This commit is contained in:
parent
bc9fcc1a21
commit
d826ee9ee9
|
@ -52,7 +52,12 @@ const GutenbergBlocksConfig = {
|
|||
output: {
|
||||
path: path.resolve( __dirname, './build/' ),
|
||||
filename: '[name].js',
|
||||
library: [ 'wc', 'blocks', '[name]' ],
|
||||
libraryTarget: 'this',
|
||||
// This fixes an issue with multiple webpack projects using chunking
|
||||
// overwriting each other's chunk loader function.
|
||||
// See https://webpack.js.org/configuration/output/#outputjsonpfunction
|
||||
jsonpFunction: 'webpackWcBlocksJsonp',
|
||||
},
|
||||
externals,
|
||||
optimization: {
|
||||
|
|
Loading…
Reference in New Issue