I'm trying to use Webpack-dev-server in a project at work that involves me mimicking a certain url structure. Long story short is there a simple way to have it serve my files from http://127.0.0.1:8090/myapp rather then just http://127.0.0.1:8090
Asked
Active
Viewed 8,343 times
2 Answers
4
What you're looking for is the option publicPath
module.exports = {
//...
devServer: {
publicPath: '/assets/'
}
};
More info:
https://webpack.js.org/configuration/dev-server/#devserver-publicpath-

Miguel
- 1,577
- 2
- 15
- 29