We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8a6ffb commit f27428bCopy full SHA for f27428b
packages/rspack/src/plugins/utils/apply-base-config.ts
@@ -147,10 +147,10 @@ function applyNxIndependentConfig(
147
...(config.ignoreWarnings ?? []),
148
];
149
150
- config.optimization = !isProd
151
- ? undefined
152
- : {
+ config.optimization =
+ {
153
...(config.optimization ?? {}),
+ ...(isProd ? {
154
sideEffects: true,
155
minimize:
156
typeof options.optimization === 'object'
@@ -182,7 +182,7 @@ function applyNxIndependentConfig(
182
runtimeChunk: isDevServer
183
? config.optimization?.runtimeChunk ?? undefined
184
: false,
185
- };
+ } : {})};
186
187
config.stats = {
188
hash: true,
0 commit comments