module.exports = {
"presets": [
"@vue/babel-preset-jsx",
[
"@babel/preset-env",
{
"modules": false
}
]
],
"plugins": [
"@babel/plugin-proposal-nullish-coalescing-operator",// 可选链 es2020
"@babel/plugin-proposal-optional-chaining",// 双问号 es2020
"babel-plugin-transform-vite-meta-env",//转换环境变量,vite几个参数同步到webpack编译中
"@babel/plugin-syntax-dynamic-import",
[//hi-ui 按需引用
"component",
{
"libraryName": "hi-ui",
// "styleLibraryName": "theme-chalk"
"style":false//默认true 时会报错,组件必顺有样式,但有些找不到样式,
},"hi-ui"
],
// [//element 按需引用
// "component",
// {
// "libraryName": "element-ui",
// "styleLibraryName": "theme-chalk"
// },"element-ui"
// ]
]
};