Dev-server proxies /api and WS request to backend.

This commit is contained in:
2020-12-06 23:19:15 +01:00
parent 9265572e45
commit 1839810e66
7 changed files with 131 additions and 149 deletions

View File

@@ -33,11 +33,24 @@ let webpackConfig = merge(commonConfig(true), {
devServer: {
compress: true,
historyApiFallback: true,
host: "0.0.0.0",
hot: true,
overlay: true,
stats: {
normal: true
}
},
proxy: {
"/api": {
target: "http://localhost:30030",
changeOrigin: true
},
"/socket.io": {
target: "ws://localhost:30030",
changeOrigin: false,
ws: true
}
},
writeToDisk: false
}
});