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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM