From d8ad0d3cbf69457d3763eaae2ad9b74dbdc27466 Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Mon, 3 Jul 2023 22:48:32 +0200 Subject: [PATCH] Fix `modularizeImports` transform of `antd` (#52148) `antd` should be using `kebabCase`: https://unpkg.com/browse/antd@5.6.4/es/index.js This addresses the problem below as I tested locally: CleanShot 2023-07-03 at 20 45 48@2x --- 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 fddb06fb22bca..8c2b5ed9552ae 100644 --- a/packages/next/src/server/config.ts +++ b/packages/next/src/server/config.ts @@ -714,7 +714,7 @@ function assignDefaults( transform: 'react-bootstrap/{{member}}', }, antd: { - transform: 'antd/es/{{member}}', + transform: 'antd/es/{{kebabCase member}}', }, ahooks: { transform: 'ahooks/es/{{member}}',