antd引入问题
来源:3-3 导航样式调整

慕先生9198790
2023-11-23
原先我使用老师的方式 npm install antd --save ,引入@import 'antd/dist/antd.css'; 的时候报错.
报错信息如下:
2. 然后我尝试使用官网的next下载方法,链接如下:
https://ant-design.antgroup.com/docs/react/use-with-next-cn
依旧报错
Server Error SyntaxError: Cannot use import statement outside a module This error happened while generating the page. Any console logs will be displayed in the terminal window.
写回答
1回答
-
Tomas
2023-11-24
是不是装的 antd5 啊,antd5 修改了打包方式,课程用的应该是 antd4 的版本042023-11-27
相似问题
antd dropdown 悬停不显示
回答 1
类型引入
回答 1