fix:修改本地刷新报错的问题

This commit is contained in:
zhangyu
2022-09-02 14:32:26 +08:00
parent 18bffb7a09
commit 74782f319e
2 changed files with 1 additions and 11 deletions

View File

@@ -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,

View File

@@ -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