ant-design-icons icon indicating copy to clipboard operation
ant-design-icons copied to clipboard

ant-design-icons在nextjs首页渲染时样式未能预先加载

Open FeiPengDev opened this issue 7 months ago • 1 comments

Reproduction link

Edit on CodeSandbox

Steps to reproduce

按照指导在使用nextjs app router时添加了@ant-design/nextjs-registry来解决页面闪动,但是icon库的样式并未按照预想的提前加载

image

可以看到刷新页面时spin的样式不能及时加载导致loading icon静止 spin

https://ant.design/docs/react/use-with-next-cn#%E4%BD%BF%E7%94%A8-app-router

What is expected?

icon库的样式正确加载

What is actually happening?

在nextjs中antd-icons库的样式加载顺序不正确

Environment Info
antd 5.13.2
ant-design/icons 5.2.6
React react18
System windows
Browser chrome

FeiPengDev avatar Jan 19 '24 18:01 FeiPengDev