vue項(xiàng)目,使用webpack4,用了mint-ui,配置粘貼的這個(gè)
項(xiàng)目打包報(bào)了這個(gè)錯(cuò)
ERROR in ./src/modules/home/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: .plugins[0][1] must be an object, false, or undefined
at assertPluginItem (/Users/fengzhenni/Desktop/workspace/newHome/node_modules/@babel/core/lib/config/validation/option-assertions.js:244:15)
babel-loader .plugins[0][1]
所以打開.babelrc
文件,看了plugins,
"plugins": [
[
"component",
[
{
"libraryName": "mint-ui",
"style": true
}
]
]
]
改成對象
"plugins": [
[
"component",
{
"libraryName": "mint-ui",
"style": true
}
]
]
問題解決