From 4aadfac631e657b889fb58a25ffd35fa88db1b41 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 24 Jul 2023 18:21:28 +0100 Subject: [PATCH] fix(webpack): remove legacy support for `build.extend` (#22305) --- packages/webpack/src/utils/config.ts | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/packages/webpack/src/utils/config.ts b/packages/webpack/src/utils/config.ts index 5245599fc5..436c3c6429 100644 --- a/packages/webpack/src/utils/config.ts +++ b/packages/webpack/src/utils/config.ts @@ -57,27 +57,6 @@ export function fileName (ctx: WebpackConfigContext, key: string) { } export function getWebpackConfig (ctx: WebpackConfigContext): Configuration { - // @ts-expect-error TODO: remove support for `build.extend` in v3.6 - const { extend } = ctx.options.build - if (typeof extend === 'function') { - logger.warn('[nuxt] The `build.extend` and `webpack.build.extend` properties have been deprecated in Nuxt 3 for some time and will be removed in a future minor release. Instead, you can extend webpack config using the `webpack:config` hook.') - - const extendedConfig = extend.call( - {}, - ctx.config, - { loaders: [], ...ctx } - ) || ctx.config - - const pragma = /@|#/ - const { devtool } = extendedConfig - if (typeof devtool === 'string' && pragma.test(devtool)) { - extendedConfig.devtool = devtool.replace(pragma, '') - logger.warn(`devtool has been normalized to ${extendedConfig.devtool} as webpack documented value`) - } - - return extendedConfig - } - // Clone deep avoid leaking config between Client and Server return cloneDeep(ctx.config) }