Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

reactjs - Ant design page reloading css rendering delay

I used my react TypeScript project for ant-design, I have some issue when I reload the page, css loading delay, any reason for this?

I imported my main.css to

@import './../node_modules/antd/dist/antd.css'; 
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Replace

@import './../node_modules/antd/dist/antd.css';

with

@import '~antd/dist/antd.css';

This is given in the documentation you linked.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...