08335 / hivui-platform-template
hivui平台项目模板
Newer
Older
hivui-platform-template / babel.config.js
caibinghong on 28 Dec 2021 add 新版本编译
module.exports = {
    "presets": [
        "@vue/babel-preset-jsx",
        [
            "@babel/preset-env",
            {
                "modules": false
            }
        ]
    ],
    "plugins": [
        "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"
        // ]
    ]
};