Skip to content

Commit

Permalink
Fix modularizeImports transform of antd (#52148)
Browse files Browse the repository at this point in the history
`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:

<img width="397" alt="CleanShot 2023-07-03 at 20 45 48@2x"
src="https://github.com/vercel/next.js/assets/3676859/73ae99b9-0f3b-49ef-9675-9f45322b708d">
  • Loading branch information
shuding committed Jul 8, 2023
1 parent e55e5da commit aab55ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}}',
Expand Down

0 comments on commit aab55ce

Please sign in to comment.