I am running localhost:3042
. My files are serving in network tab like this:
But I have to serve the URL like: http://localhost:3042/dual/main.27678bfec444f64cd7ab.js
I am using mod_proxy
to serve this project files to other projects. Another project URL like http://localhost:3030/dual
. but it needs files to serve from http://localhost:3042/dual/main.27678bfec444f64cd7ab.js
but currently, it serves http://localhost:3042/main.27678bfec444f64cd7ab.js
, so getting 400.
I have tried with webpack devserver
as shown below:
devServer: {
port: 3042,
historyApiFallback: true,
publicPath: '/',
proxy: {
'/dual': {
target: 'http://localhost:[port]/',
pathRewrite: { '^/dual': '' },
},
},
},
but it won`t work, any help on how to do this?