From fcb9ad20cfb4f1d691f76f575e3bcf09729be7c9 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期三, 13 十二月 2023 16:51:16 +0800 Subject: [PATCH] 最新 --- config/index.js | 27 +++++++++++++++++++++++---- 1 files changed, 23 insertions(+), 4 deletions(-) diff --git a/config/index.js b/config/index.js index 630fa1a..f4c8d16 100644 --- a/config/index.js +++ b/config/index.js @@ -13,14 +13,14 @@ proxyTable: {}, // Various Dev Server settings - host: 'localhost', // can be overwritten by process.env.HOST + host: '0.0.0.0', // can be overwritten by process.env.HOST port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, notifyOnErrors: true, poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- - + /** * Source Maps */ @@ -33,7 +33,23 @@ // https://vue-loader.vuejs.org/en/options.html#cachebusting cacheBusting: true, - cssSourceMap: true + cssSourceMap: true, + proxyTable: { + // 杩欓噷閰嶇疆 '/api' 灏辩瓑浠蜂簬 target , 浣犲湪閾炬帴閲岃闂� /api === http://localhost:54321 + '/api': { + target: 'http://10.10.4.121:8070', + // secure: true, // 濡傛灉鏄� https ,闇�瑕佸紑鍚繖涓�夐」 + changeOrigin: true, // 鏄惁鏄法鍩熻姹�?鑲畾鏄晩,涓嶈法鍩熷氨娌℃湁蹇呰閰嶇疆杩欎釜proxyTable浜�. + pathRewrite: { // 閲嶅啓璺緞 渚嬪娴忚鍣ㄨ姹傚湴鍧�http://localhost:12345/xxx,瀹為檯璇锋眰鐨勬槸浣犱唬鐞嗙殑鍦板潃锛歨ttp:xxx/11111 + // 杩欓噷鏄拷鍔犻摼鎺�,姣斿鐪熸槸鎺ュ彛閲屽寘鍚簡 /api,灏遍渶瑕佽繖鏍烽厤缃�. + '^/api': '', // 鍜屼笅杈逛袱绉嶅啓娉曪紝鍥犱汉鑰屽紓鏍规嵁闇�姹傘�� + // 绛変环浜� /api + /api == http://localhost:54321/api + // 濡傛灉鍐欎负 '^/api' : '/' + // 绛変环浜� /api + / == http://localhost:54321/ + // 杩欓噷鐨� /api == http://localhost:54321 + } + } + } }, build: { @@ -49,7 +65,10 @@ * Source Maps */ - productionSourceMap: true, + + + productionSourceMap: true,//娴忚鍣ㄦ簮浠g爜鍙互鐪嬪埌 + // productionSourceMap: false, // https://webpack.js.org/configuration/devtool/#production devtool: '#source-map', -- Gitblit v1.9.3