mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 09:50:37 -06:00
DEV: Add DISCOURSE_WEBPACK_MINIMIZE
to reenable webpack minimize. (#28066)
Disabling webpack minimize is a bug we are working to resolve but we have to consider self-hosters that deploy on low cost hardware and reenabling this for them drastically increases the build time. For now, add a `DISCOURSE_WEBPACK_MINIMIZE` env to allow sites to opt back in.
This commit is contained in:
parent
7a7cc815be
commit
c7911441fa
@ -140,8 +140,8 @@ module.exports = function (defaults) {
|
||||
chunkFilename: `assets/chunk.[chunkhash].${cachebusterHash}.js`,
|
||||
},
|
||||
optimization: {
|
||||
// Disable webpack minimization. Embroider automatically applies terser after webpack.
|
||||
minimize: false,
|
||||
// TODO: Minimization being disabled is a bug and we are currently working to restore it.
|
||||
minimize: process.env.DISCOURSE_WEBPACK_MINIMIZE === "1",
|
||||
},
|
||||
cache: isProduction
|
||||
? false
|
||||
|
Loading…
Reference in New Issue
Block a user