I've updated antd to 5.0.0. I've these imports which are giving error now.
@import '~antd/es/style/themes/default.less';
@import '~antd/dist/antd.less';
what should I replace with in new versions?
From v4 to v5, antd CSS files are no longer included in package.
Since CSS-in-JS supports importing on demand, the original antd/dist/antd.css
has also been abandoned.
If you need to reset some basic styles, please use import antd/dist/reset.css
. So just delete this code if you don't need to reset basic styles.
Reference: https://ant.design/docs/react/migration-v5