|
|
|
@ -40,21 +40,23 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
VueJsx(),
|
|
|
|
VueJsx(),
|
|
|
|
progress(),
|
|
|
|
progress(),
|
|
|
|
createStyleImportPlugin({
|
|
|
|
env.VITE_USE_ALL_ELEMENT_PLUS_STYLE === 'false'
|
|
|
|
resolves: [ElementPlusResolve()],
|
|
|
|
? createStyleImportPlugin({
|
|
|
|
libs: [
|
|
|
|
resolves: [ElementPlusResolve()],
|
|
|
|
{
|
|
|
|
libs: [
|
|
|
|
libraryName: 'element-plus',
|
|
|
|
{
|
|
|
|
esModule: true,
|
|
|
|
libraryName: 'element-plus',
|
|
|
|
resolveStyle: (name) => {
|
|
|
|
esModule: true,
|
|
|
|
if (name === 'click-outside') {
|
|
|
|
resolveStyle: (name) => {
|
|
|
|
return ''
|
|
|
|
if (name === 'click-outside') {
|
|
|
|
|
|
|
|
return ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return `element-plus/es/components/${name.replace(/^el-/, '')}/style/css`
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return `element-plus/es/components/${name.replace(/^el-/, '')}/style/css`
|
|
|
|
]
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
: undefined,
|
|
|
|
]
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
EslintPlugin({
|
|
|
|
EslintPlugin({
|
|
|
|
cache: false,
|
|
|
|
cache: false,
|
|
|
|
include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件
|
|
|
|
include: ['src/**/*.vue', 'src/**/*.ts', 'src/**/*.tsx'] // 检查的文件
|
|
|
|
@ -120,7 +122,16 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rollupOptions: {
|
|
|
|
rollupOptions: {
|
|
|
|
plugins: env.VITE_USE_BUNDLE_ANALYZER === 'true' ? [visualizer()] : undefined
|
|
|
|
plugins: env.VITE_USE_BUNDLE_ANALYZER === 'true' ? [visualizer()] : undefined,
|
|
|
|
|
|
|
|
// 拆包
|
|
|
|
|
|
|
|
output: {
|
|
|
|
|
|
|
|
manualChunks: {
|
|
|
|
|
|
|
|
vue: ['vue', 'vue-router', 'pinia', 'vue-i18n'],
|
|
|
|
|
|
|
|
'element-plus': ['element-plus'],
|
|
|
|
|
|
|
|
'wang-editor': ['@wangeditor/editor', '@wangeditor/editor-for-vue'],
|
|
|
|
|
|
|
|
echarts: ['echarts', 'echarts-wordcloud']
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
server: {
|
|
|
|
|