From 03189bb2ac5c9bc62fcf9bf80c579e870e23f64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Sat, 29 Apr 2023 21:06:08 +0900 Subject: [PATCH] Update resolve rule for `@swc/helpers` (#48980) ### What? Update resolve rule for `@swc/helpers` => `node_modules/@swc/helpers` to `@swc/helpers/_` => `node_modules/@swc/helpers/_` to select only `@swc/helpers@v0.5.0`. ### Why? Previous rule make webpack merge `@swc/helpers@v0.4.x` and `@swc/helpers@v0.5.x` ### How? Closes WEB-948 Fixes #48593 --- packages/next/src/build/webpack-config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts index 3b616a8f5318e..3b1c1bf306738 100644 --- a/packages/next/src/build/webpack-config.ts +++ b/packages/next/src/build/webpack-config.ts @@ -1071,8 +1071,9 @@ export default async function getBaseWebpackConfig( } : {}), - '@swc/helpers': path.dirname( - require.resolve('@swc/helpers/package.json') + '@swc/helpers/_': path.join( + path.dirname(require.resolve('@swc/helpers/package.json')), + '_' ), setimmediate: 'next/dist/compiled/setimmediate',