frontend: Optimize production builds (#795)
This commit is contained in:
parent
61302d7112
commit
01ce288a54
|
@ -6,7 +6,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
||||
|
||||
|
||||
module.exports = (withDebug) => {
|
||||
module.exports = (withDebug, optimize) => {
|
||||
return {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
|
@ -45,7 +45,7 @@ module.exports = (withDebug) => {
|
|||
options: {
|
||||
// add Elm's debug overlay to output
|
||||
debug: withDebug,
|
||||
optimize: false
|
||||
optimize: optimize,
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -29,5 +29,5 @@ const dev = {
|
|||
|
||||
module.exports = env => {
|
||||
const withDebug = !env.nodebug;
|
||||
return merge(common(withDebug), dev);
|
||||
return merge(common(withDebug, false), dev);
|
||||
}
|
||||
|
|
|
@ -61,4 +61,4 @@ const prod = {
|
|||
|
||||
};
|
||||
|
||||
module.exports = merge(common(false), prod);
|
||||
module.exports = merge(common(false, true), prod);
|
||||
|
|
Loading…
Reference in a new issue