zhengnaiwen_citu 3 månader sedan
förälder
incheckning
c34ae4941f
2 ändrade filer med 39 tillägg och 1 borttagningar
  1. 13 0
      package.json
  2. 26 1
      vue.config.js

+ 13 - 0
package.json

@@ -63,5 +63,18 @@
     "uglifyjs-webpack-plugin": "^2.2.0",
     "vue-cli-plugin-vuetify": "~2.5.8",
     "vue-template-compiler": "^2.6.14"
+  },
+  "browserslist": {
+    "production": [
+      "> 1%",
+      "last 2 versions",
+      "not dead",
+      "ie >= 11"
+    ],
+    "development": [
+      "last 1 chrome version",
+      "last 1 firefox version",
+      "last 1 safari version"
+    ]
   }
 }

+ 26 - 1
vue.config.js

@@ -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: {