npm i babel-plugin-component -D
.babelrc
{
"presets": [["@babel/preset-env", { "modules": false }]],
"plugins": [
[
"component",
{
"libraryName": "element-ui",
"styleLibraryName": "theme-chalk"
}
]
]
}
babel.config.js
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}