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-componentreact

相關文章
相關標籤/搜索