报错Incorrect type. Expected one of string, object.
mint-ui库的文档里说用以下代码修改babelrc文件
{
"presets": [
["es2015", { "modules": false }]
],
"plugins": [["component", [
{
"libraryName": "mint-ui",
"style": true
}
]]]
}
不是替换原本的babelrc文件,是将component代码加入到plugins中即下面这样
注意:加入的时候要去掉对象外的中括号[],如果不去掉直接添加就会报错
"plugins": ["transform-vue-jsx", "transform-runtime",["component",
{
"libraryName": "mint-ui",
"style": true
}
]]