Make common chunk (and sourcemap) work
This commit is contained in:
@@ -19,8 +19,12 @@ module.exports = {
|
|||||||
target: 'web',
|
target: 'web',
|
||||||
entry: entry,
|
entry: entry,
|
||||||
optimization: {
|
optimization: {
|
||||||
|
runtimeChunk: {
|
||||||
|
name: 'common'
|
||||||
|
},
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
name: 'common', // TODO: figure out why this isn't working
|
name: 'common',
|
||||||
|
chunks: 'initial',
|
||||||
minChunks: 2
|
minChunks: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -37,8 +41,7 @@ module.exports = {
|
|||||||
{from: 'index.html', to: 'index.html'}
|
{from: 'index.html', to: 'index.html'}
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
// TODO: figure out why this hangs
|
devtool: 'source-map',
|
||||||
// devtool: 'source-map',
|
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: path.join(__dirname, '..', '..', 'build', 'examples')
|
path: path.join(__dirname, '..', '..', 'build', 'examples')
|
||||||
|
|||||||
Reference in New Issue
Block a user