Reputation: 838
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
Upvotes: 3
Views: 9666
Reputation: 71
I found an answer to this question that worked for me here.
Just use Webpack's open
option like this:
module.exports = {
// ...
devServer: {
open: ['/myapp'],
// ...
},
}
Upvotes: 0
Reputation: 1636
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-
Upvotes: 4