From 49345844dc953732e015889d58ea73b2bc7adef9 Mon Sep 17 00:00:00 2001
From: 1012414140@qq.com <1012414140@qq.com>
Date: 星期五, 16 十月 2026 09:50:34 +0800
Subject: [PATCH] feat: 去缴费功能
---
vue.config.js | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 104 insertions(+), 13 deletions(-)
diff --git a/vue.config.js b/vue.config.js
index 5921df5..36e54b7 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,17 +1,108 @@
+var path = require('path')
module.exports = {
- baseUrl: './',
- assetsDir: 'static',
- productionSourceMap: false,
- devServer: {
- proxy: {
- '/api':{
- target:'http://183.196.93.178',
- //target:'http://127.0.0.1',
- changeOrigin:true,
- pathRewrite:{
- '/api':''
- }
+ 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'
+ },
+ // =======================================================
+
+ 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