vue中按需引入mint-UI报Error: .plugins[3][1] must be an object, false, or undefined

{
    "presets": ["@babel/preset-env", "@babel/preset-react"],
    "plugins": ["@babel/plugin-transform-runtime", 
        "@babel/plugin-proposal-object-rest-spread",
         "@babel/plugin-proposal-class-properties", 
         ["component", 
        {
          "libraryName": "mint-ui",
          "style": true
        }
      ]]
}

在“component”’后面直接跟一个对象,mint-ui文档中多了[ ],babel-plugin-component的使用还是要参考官方用法:https://www.npmjs.com/package/babel-plugin-component

posted on 2019-06-03 12:50  zengsf  阅读(3730)  评论(0编辑  收藏  举报

导航