frontend: Optimize production builds (#795)

This commit is contained in:
Janne Heß 2024-06-11 23:32:06 +02:00 committed by GitHub
parent 61302d7112
commit 01ce288a54
Failed to generate hash of commit
3 changed files with 4 additions and 4 deletions

View file

@ -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,
}
}
]

View file

@ -29,5 +29,5 @@ const dev = {
module.exports = env => {
const withDebug = !env.nodebug;
return merge(common(withDebug), dev);
return merge(common(withDebug, false), dev);
}

View file

@ -61,4 +61,4 @@ const prod = {
};
module.exports = merge(common(false), prod);
module.exports = merge(common(false, true), prod);