Skip to content
Snippets Groups Projects
Commit 328da7f7 authored by Jeremy Bowman's avatar Jeremy Bowman
Browse files

TE-2551 Fix commons.js optimization reliability

parent b9092c80
Branches
Tags
No related merge requests found
......@@ -19,7 +19,14 @@ var optimizedConfig = Merge.smart(commonConfig, {
new webpack.LoaderOptionsPlugin({ // This may not be needed; legacy option for loaders written for webpack 1
minimize: true
}),
new webpack.optimize.UglifyJsPlugin()
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.CommonsChunkPlugin({
// If the value below changes, update the render_bundle call in
// common/djangoapps/pipeline_mako/templates/static_content.html
name: 'commons',
filename: 'commons.[chunkhash].js',
minChunks: 3
})
]
});
......@@ -39,8 +46,17 @@ var optimizedConfig = Merge.smart(commonConfig, {
var requireCompatConfig = Merge.smart(optimizedConfig, {
output: {
filename: '[name].js'
}
})
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
// If the value below changes, update the render_bundle call in
// common/djangoapps/pipeline_mako/templates/static_content.html
name: 'commons',
filename: 'commons.js',
minChunks: 3
})
]
});
// Step 2: Remove the plugin entries that generate the webpack-stats.json files
// that Django needs to look up resources. We never want to accidentally
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment