From 74782f319e5db9d3f797f0b9eb3b6ddda2368a8e Mon Sep 17 00:00:00 2001 From: zhangyu Date: Fri, 2 Sep 2022 14:32:26 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=88=B7=E6=96=B0=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/build/webpack.dev.conf.js | 5 +---- nezha-fronted/config/index.js | 7 ------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/nezha-fronted/build/webpack.dev.conf.js b/nezha-fronted/build/webpack.dev.conf.js index fdc5b0e87..ede01b850 100644 --- a/nezha-fronted/build/webpack.dev.conf.js +++ b/nezha-fronted/build/webpack.dev.conf.js @@ -28,10 +28,7 @@ devWebpackConfig = merge(baseWebpackConfig, { historyApiFallback: { index: indexHtml, rewrites: [ - { - from: /.*/g, - to: '/ui/' - } + { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, indexHtml) } ] }, hot: true, diff --git a/nezha-fronted/config/index.js b/nezha-fronted/config/index.js index ce7a6fd73..4215b1ba8 100644 --- a/nezha-fronted/config/index.js +++ b/nezha-fronted/config/index.js @@ -16,13 +16,6 @@ module.exports = { pathRewrite: { '^/apis': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替 } - }, - '/ui': { - target: '/', // 设置调用接口域名和端口号别忘了加http - changeOrigin: true, - pathRewrite: { - '^/ui': '/' // 这里理解成用‘/api’代替target里面的地址,组件中我们调接口时直接用/api代替 - } } }, // Various Dev Server settings