From ff2d01588d4e69d3bf1ad856e8e225b7f6a3c0f2 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 26 八月 2024 11:01:48 +0800 Subject: [PATCH] 1、基本实现电子说明书页面布局及功能 2、基本实现语言大模型页面与后端数据联动 --- vue.config.js | 58 ++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 32 insertions(+), 26 deletions(-) diff --git a/vue.config.js b/vue.config.js index 4e39c41..737ac20 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,5 @@ const path = require('path') -const CompressionPlugin = require("compression-webpack-plugin") +const CompressionPlugin = require('compression-webpack-plugin') function resolve(dir) { return path.join(__dirname, dir) @@ -42,11 +42,11 @@ //鐢熶骇鐜锛屽紑鍚痡s\css鍘嬬缉 if (process.env.NODE_ENV === 'production') { - config.plugin('compressionPlugin').use(new CompressionPlugin({ - test: /\.(js|css|less)$/, // 鍖归厤鏂囦欢鍚� - threshold: 10240, // 瀵硅秴杩�10k鐨勬暟鎹帇缂� - deleteOriginalAssets: false // 涓嶅垹闄ゆ簮鏂囦欢 - })) + config.plugin('compressionPlugin').use(new CompressionPlugin({ + test: /\.(js|css|less)$/, // 鍖归厤鏂囦欢鍚� + threshold: 10240, // 瀵硅秴杩�10k鐨勬暟鎹帇缂� + deleteOriginalAssets: false // 涓嶅垹闄ゆ簮鏂囦欢 + })) } // 閰嶇疆 webpack 璇嗗埆 markdown 涓烘櫘閫氱殑鏂囦欢 @@ -62,9 +62,9 @@ .rule('vxe') .test(/\.js$/) .include - .add(resolve('node_modules/vxe-table')) - .add(resolve('node_modules/vxe-table-plugin-antd')) - .end() + .add(resolve('node_modules/vxe-table')) + .add(resolve('node_modules/vxe-table-plugin-antd')) + .end() .use() .loader('babel-loader') .end() @@ -78,26 +78,26 @@ /* less 鍙橀噺瑕嗙洊锛岀敤浜庤嚜瀹氫箟 ant design 涓婚 */ 'primary-color': '#1890FF', 'link-color': '#1890FF', - 'border-radius-base': '4px', + 'border-radius-base': '4px' }, - javascriptEnabled: true, + javascriptEnabled: true }, - postcss:{ - plugins:[ + postcss: { + plugins: [ require('postcss-px-to-viewport')({ - unitToConvert: "px", + unitToConvert: 'px', viewportWidth: 1920, unitPrecision: 3, propList: [ - "*" + '*' ], - viewportUnit: "vw", - fontViewportUnit: "vw", + viewportUnit: 'vw', + fontViewportUnit: 'vw', selectorBlackList: [], minPixelValue: 0, mediaQuery: false, replace: true, - exclude: /(\/|\\)(node_modules)(\/|\\)/, + exclude: /(\/|\\)(node_modules)(\/|\\)/ }) ] } @@ -115,15 +115,16 @@ // headers: { // 'Access-Control-Allow-Origin': '*', // }, + compress: false, proxy: { - /* '/api': { - target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API鎺ュ彛绯荤粺 - ws: false, - changeOrigin: true, - pathRewrite: { - '/jeecg-boot': '' //榛樿鎵�鏈夎姹傞兘鍔犱簡jeecg-boot鍓嶇紑锛岄渶瑕佸幓鎺� - } - },*/ + /* '/api': { + target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API鎺ュ彛绯荤粺 + ws: false, + changeOrigin: true, + pathRewrite: { + '/jeecg-boot': '' //榛樿鎵�鏈夎姹傞兘鍔犱簡jeecg-boot鍓嶇紑锛岄渶瑕佸幓鎺� + } + },*/ /* 娉ㄦ剰锛歫eecgboot鍓嶇鍋氫簡鏀归�狅紝姝ゅ涓嶉渶瑕侀厤缃法鍩熷拰鍚庡彴鎺ュ彛锛堝彧闇�瑕佹敼.env鐩稿叧閰嶇疆鏂囦欢鍗冲彲锛� issues/3462 寰堝浜烘澶勫仛浜嗛厤缃紝瀵艰嚧鍒锋柊鍓嶇404闂锛岃涓�瀹氭敞鎰�*/ '/jeecg-boot': { @@ -131,6 +132,11 @@ ws: false, changeOrigin: true }, + '/chat': { + target: 'https://836u458t54.vicp.fun', + ws: false, + changeOrigin: true + } } }, -- Gitblit v1.9.3