Webpack 4 chunk configuration.
This commit is contained in:
parent
df85d72217
commit
d6f895c535
@ -100,6 +100,12 @@ module.exports = {
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
optimization: {
|
||||||
|
splitChunks: {
|
||||||
|
name: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
// Workaround for angular/angular#11580
|
// Workaround for angular/angular#11580
|
||||||
new webpack.ContextReplacementPlugin(
|
new webpack.ContextReplacementPlugin(
|
||||||
@ -109,10 +115,6 @@ module.exports = {
|
|||||||
{} // a map of your routes
|
{} // a map of your routes
|
||||||
),
|
),
|
||||||
|
|
||||||
new webpack.optimize.CommonsChunkPlugin({
|
|
||||||
name: ['app', 'vendor', 'polyfills']
|
|
||||||
}),
|
|
||||||
|
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'src/index.ejs'
|
template: 'src/index.ejs'
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user