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