From 1e106aedda95d0df26ce9909da2761cde2105d32 Mon Sep 17 00:00:00 2001
From: 1012414140@qq.com <1012414140@qq.com>
Date: 星期五, 16 十月 2026 09:42:17 +0800
Subject: [PATCH] feat: 获取 “去缴费接口” 的响应失败

---
 vue.config.js |  125 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 103 insertions(+), 22 deletions(-)

diff --git a/vue.config.js b/vue.config.js
index b878498..36e54b7 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,27 +1,108 @@
-var path = require("path")
+var path = require('path')
 module.exports = {
-    baseUrl: './',
-    configureWebpack: {
-        resolve: {
-            alias: {
-                '@': path.join(__dirname, 'src')
-            }
-        }
+  publicPath: '/',
+  assetsDir: 'static',
+  productionSourceMap: false, // 鍏抽棴sourceMap锛屽噺灏戜骇鐗╀綋绉�
+
+  // 寮哄埗鎶界 CSS 涓虹嫭绔嬫枃浠讹紝涓嶅唴鑱旇繘 JS
+  css: {
+    extract: true
+  },
+
+  configureWebpack: {
+    // ========== 鍙缃細ElementUI / ViewUI / ECharts锛屽繀椤诲缃� vue ==========
+    externals: {
+      'vue': 'Vue',
+      'element-ui': 'ELEMENT',
+      // view-design 4.x 鐨� UMD 鍖咃紙dist/iview.min.js锛夊湪娴忚鍣ㄤ笅鎸傝浇鐨勫叏灞�鍚嶆槸 iview
+      'view-design': 'iview',
+      'echarts': 'echarts'
     },
-    assetsDir: 'static',
-    productionSourceMap: false,
-    devServer: {
-        sockHost: 'localhost',
-        disableHostCheck: true,
-        proxy: {
-            '/api':{
-                //target:'http://183.196.93.178',
-                target:'http://127.0.0.1',
-                changeOrigin:true,
-                pathRewrite:{
-                    '/api':''
-                }
+    // =======================================================
+
+    optimization: {
+      minimizer: [
+        new (require('terser-webpack-plugin'))({
+          terserOptions: {
+            compress: {
+              drop_console: true, // 绉婚櫎console
+              drop_debugger: true, // 绉婚櫎debugger
+              pure_funcs: ['console.log', 'console.info', 'console.warn']
+            },
+            mangle: {
+              safari10: true
+            },
+            output: {
+              comments: false // 绉婚櫎鎵�鏈夋敞閲�
             }
+          },
+          extractComments: false,
+          parallel: true // 澶氳繘绋嬪帇缂�
+        })
+      ],
+
+      runtimeChunk: 'single',
+
+      splitChunks: {
+        chunks: 'all',
+        minSize: 10 * 1024, // 20kb 鈫� 10kb锛屾媶鍒嗘洿鍏呭垎
+        minChunks: 2,
+        maxAsyncRequests: 30,
+        maxInitialRequests: 30,
+        name: false,
+
+        cacheGroups: {
+          common: {
+            name: 'common',
+            chunks: 'all',
+            minChunks: 2,
+            priority: 5,
+            reuseExistingChunk: true
+          },
+          vendor: {
+            test: /[\\/]node_modules[\\/]/,
+            name: 'vendor',
+            chunks: 'all',
+            priority: 10,
+            reuseExistingChunk: true
+          }
         }
+      }
+    },
+    resolve: {
+      alias: {
+        '@': path.join(__dirname, 'src')
+      }
     }
-}
+  },
+
+  // 鍥剧墖浼樺寲 + 鍏抽棴棰勫姞杞藉啑浣�
+  chainWebpack(config) {
+    config.module
+      .rule('images')
+      .use('url-loader')
+      .loader('url-loader')
+      .tap(options => {
+        options.limit = 4 * 1024
+        return options
+      })
+    config.plugins.delete('prefetch')
+    config.plugins.delete('preload')
+  },
+
+  devServer: {
+    sockHost: 'localhost',
+    port: 8082,
+    disableHostCheck: true,
+    proxy: {
+      '/': {
+        target: 'http://183.196.93.178:8089',
+        // target: 'http://192.168.0.147:8089',
+        changeOrigin: true,
+        pathRewrite: {
+          '/': ''
+        }
+      }
+    }
+  }
+}
\ No newline at end of file

--
Gitblit v1.9.1