How to configure vue cli3 babel.config.js can reference multiple different component libraries as needed

for example, the vue project I created using vue cli3.0 needs to reference the vant,we-vue library on demand at the same time. The dependency

babel.config.js


vantwe-vueuibabel


:

babel:


:

:



:

has been installed.
Apr.14,2021

const path = require('path')

 plugins:[
      ["import", {
              "libraryName": "vant",
              "libraryDirectory": "es",
              "style": true
            }],
      ["import", {
              "libraryName": "we-vue",
              "style": file => path.resolve(path, '../style.css')
            }, 'we-vue']
  ]

after consulting with the we-vue author, I know that you have to quote the css style file on your own. If there is no automatic loading of styles on demand, the next version of we-vue will be optimized.
take a closer look at github issues
https://github.com/tianyong90.


what is this folder for? Specifically configure the third-party plug-in component UI library?

Menu