Fix publicPath and asset handling when using webpack-dev-server for HMR

This commit is contained in:
Dannon Baker
2022-01-12 09:07:46 -05:00
parent ac3a5bfc81
commit 58e6f2257d
+8 -3
View File
@@ -207,16 +207,21 @@ module.exports = (env = {}, argv = {}) => {
warnings: false,
},
},
devMiddleware: {
publicPath: '/static/dist'
},
hot: true,
// proxy *everything* to the galaxy server
// someday, this can be a more limited set -- e.g. `/api`, `/auth`
port: 8081,
host: "0.0.0.0",
// proxy *everything* to the galaxy server.
// someday, when we have a fully API-driven independent client, this
// can be a more limited set -- e.g. `/api`, `/auth`
proxy: {
"/": {
"**": {
target: process.env.GALAXY_URL || "http://localhost:8080",
secure: process.env.CHANGE_ORIGIN ? !process.env.CHANGE_ORIGIN : true,
changeOrigin: !!process.env.CHANGE_ORIGIN,
logLevel: 'debug'
},
},
},