fix:修改本地刷新报错的问题
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user