mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -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`,
|
chunkFilename: `assets/chunk.[chunkhash].${cachebusterHash}.js`,
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
// Disable webpack minimization. Embroider automatically applies terser after webpack.
|
// TODO: Minimization being disabled is a bug and we are currently working to restore it.
|
||||||
minimize: false,
|
minimize: process.env.DISCOURSE_WEBPACK_MINIMIZE === "1",
|
||||||
},
|
},
|
||||||
cache: isProduction
|
cache: isProduction
|
||||||
? false
|
? false
|
||||||
|
Loading…
Reference in New Issue
Block a user