【发布时间】:2020-06-24 10:47:31
【问题描述】:
我使用 Next.js + 和设计,在 .babelrc 中我导入了 Ant Design,但现在我不能使用 SVG 文件,我导入了 inline-react-svg,但后来我得到了错误 'Error :. plugins [0] [1] must be an object, false or undefined without this import代码,{"libraryName": "antd","style": true}一切正常
babelrc:
{
"presets": [
"next/babel"
],
"plugins": [
[
"inline-react-svg",
"import",
{
"libraryName": "antd",
"style": true
},
]
]
}
【问题讨论】: