mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
fix(webpack): enable minimize for client production bundles (#404)
This commit is contained in:
parent
403ee671eb
commit
5a1ccec61f
@ -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: {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user