webpack-dev-server: webpack.config.js, webpack-dev-server open option has bug.
on the webpack-dev-server@2.5.0. I was set like this.
devServer: {
hot : true,
inline: true,
host: '0.0.0.0',
disableHostCheck: true,
port: 3000,
open : true, // this is point option
contentBase : "public",
watchOptions: {
aggregateTimeout: 300,
poll: 1000
}
},
I expect open http://localhost:3000/ on browser, but the behavior is http://localhost:3000/undefined. So I tested on webpack-dev-server@2.4.5. It works good. I think @2.5.0 bug. How about reference require(โopnโ). I guess this module is related the behavior.
Thanks !
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 33
- Comments: 20 (2 by maintainers)
Commits related to this issue
- Fix config for webpack-dev-server 2.5.0 (#1080) https://github.com/webpack/webpack-dev-server/issues/960 See #1080 — committed to dmx-systems/dmx-platform by jri 7 years ago
As a quick fix, you can add
openPage: ''
to your options:@MarioDabrowski @aprather51 @polettoweb @goartur @scarletgirl Please use reactions on the original post in this thread (for example, ๐ ) instead of posting โ+1โ replies. It doesnโt contribute to the discussion and only clutters the issue.
Use reactions ๐ option if you want to give more value to this issue instead of commenting +1.
Had the same problem with it today. Thanks for solutions!
+1