|
@@ -115,7 +115,32 @@ module.exports = defineConfig({
|
|
|
},
|
|
|
// babel-loader 是否处理 node_modules 中的依赖包,处理哪些依赖包,参数类型: boolean | Array<string | RegExp>
|
|
|
transpileDependencies: [
|
|
|
- true
|
|
|
+ // Vue 相关
|
|
|
+ 'vue',
|
|
|
+ 'vuex',
|
|
|
+ 'vue-router',
|
|
|
+ '@vue/composition-api',
|
|
|
+
|
|
|
+ // UI 组件库
|
|
|
+ 'element-ui',
|
|
|
+
|
|
|
+ // 编辑器
|
|
|
+ '@wangeditor/editor',
|
|
|
+ '@wangeditor/editor-for-vue',
|
|
|
+
|
|
|
+ // 其他可能包含 ES6 代码的依赖
|
|
|
+ 'axios',
|
|
|
+ 'lodash',
|
|
|
+ 'echarts',
|
|
|
+ 'decimal.js',
|
|
|
+ 'nprogress',
|
|
|
+ 'element-resize-detector'
|
|
|
+
|
|
|
+ // 使用正则匹配更广泛的包
|
|
|
+ // /node_modules\/@wangeditor/,
|
|
|
+ // /node_modules\/vue-/,
|
|
|
+ // /node_modules\/element-ui/,
|
|
|
+ // /node_modules\/echarts/
|
|
|
],
|
|
|
// 移除console
|
|
|
terser: {
|