From 2e82ca81114f40c12dcdff52c0b264d46f29fc5f Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Mon, 13 Nov 2023 11:31:29 +0800 Subject: [PATCH] fix: import antd from es in modularizeImports (#57968) ### Fixing a bug Currently any imports from antd will be replaced with `lib`, which will cause context not the same. Ref: https://github.com/ant-design/ant-design/issues/45567 --- packages/next/src/server/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/src/server/config.ts b/packages/next/src/server/config.ts index 58ecb824f6bc5..0fa4663b8dc6b 100644 --- a/packages/next/src/server/config.ts +++ b/packages/next/src/server/config.ts @@ -792,7 +792,7 @@ function assignDefaults( }, }, antd: { - transform: 'antd/lib/{{kebabCase member}}', + transform: 'antd/es/{{kebabCase member}}', }, ahooks: { transform: {