diff --git a/packages/kit/src/config/schema/build.ts b/packages/kit/src/config/schema/build.ts index 11d3f6b276..693120d7cd 100644 --- a/packages/kit/src/config/schema/build.ts +++ b/packages/kit/src/config/schema/build.ts @@ -291,7 +291,7 @@ export default { optimization: { runtimeChunk: 'single', /** Set minimize to false to disable all minimizers. (It is disabled in development by default) */ - minimize: { $resolve: (val, get) => val ?? get('dev') }, + minimize: { $resolve: (val, get) => val ?? !get('dev') }, /** You can set minimizer to a customized array of plugins. */ minimizer: undefined, splitChunks: { diff --git a/packages/webpack/src/configs/client.ts b/packages/webpack/src/configs/client.ts index fb65be6cd3..95f45b1261 100644 --- a/packages/webpack/src/configs/client.ts +++ b/packages/webpack/src/configs/client.ts @@ -71,14 +71,7 @@ function clientHMR (ctx: WebpackConfigContext) { config.plugins.push(new webpack.HotModuleReplacementPlugin()) } -function clientOptimization (ctx: WebpackConfigContext) { - const { options, config } = ctx - - config.optimization = { - ...config.optimization, - ...options.build.optimization as any - } - +function clientOptimization (_ctx: WebpackConfigContext) { // TODO: Improve optimization.splitChunks.cacheGroups }