apaas-custom-mydemo/babel.config.js
2025-12-20 14:20:26 +08:00

56 lines
1009 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Element UI 懒加载插件由于我们需要使用懒加载scss动态编译主题所以不使用
*/
// eslint-disable-next-line no-unused-vars
const elementUIComponentPlugin = [
'component',
{
libraryName: 'element-ui',
styleLibraryName: '../packages/theme-chalk/src',
ext: '.scss'
},
'element-ui'
]
const XLibComponentPlugin = [
'component',
{
libraryName: '@x-ui/x-dcloud-ui',
styleLibrary: {
base: false,
name: 'theme-chalk/theme'
},
ext: '.scss'
},
'@x-ui/x-dcloud-ui'
]
const XDcloudPageWebPlugin = [
'component',
{
libraryName: '@x-apaas/x-dcloud-page-web',
styleLibrary: {
base: false,
name: 'theme-chalk/theme'
},
ext: '.scss'
},
'@x-apaas/x-dcloud-page-web'
]
module.exports = {
presets: [
[
'@vue/cli-plugin-babel/preset',
{
useBuiltIns: 'entry'
}
]
],
plugins: [
elementUIComponentPlugin,
XLibComponentPlugin,
XDcloudPageWebPlugin
]
}