Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: .plugins[0][1] must b...

vue项目,使用webpack4,用了mint-ui,配置粘贴的这个


项目打包报了这个错
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
              }         
        ]
    ]

问题解决

你可能感兴趣的:(Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: .plugins[0][1] must b...)