LAPTOP-FO2T5SIU\35838 15 часов назад
Родитель
Сommit
486b7ab4ed
1 измененных файлов с 15 добавлено и 2 удалено
  1. 15 2
      vue.config.js

+ 15 - 2
vue.config.js

@@ -24,6 +24,7 @@ const name = defaultSettings.title || "小艾协同管理平台"; // page title
 // For example, Mac: sudo npm run
 const ip = "0.0.0.0"; // dev port
 const port = 9528; // dev port
+const TerserPlugin = require("terser-webpack-plugin");
 
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -54,7 +55,7 @@ module.exports = {
         proxy: {
             // 配置跨域
             "/webServer": {
-                target: 'http://localhost:9001',
+                target: 'http://localhost:9016',
                 ws: true,
                 changOrigin: true, // 允许跨域
                 pathRewrite: {
@@ -72,7 +73,19 @@ module.exports = {
                 "@": resolve("src")
             }
         },
-        plugins
+        plugins,
+        optimization: {
+            minimizer: [
+                new TerserPlugin({
+                    terserOptions: {
+                        output: {
+                            comments: false
+                        }
+                    },
+                    extractComments: false
+                })
+            ]
+        }
         // externals: {
         //     'vue': 'Vue',
         //     'vue-router': 'VueRouter',