-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlay doesn't work with random port started #1059
Comments
I know the reason for this is webpack.config.js needs to be updated with the port number, but this is seemingly impossible given the port is unknown, so I think this is rightly considered a bug (anyway it is keeping me from doing what I want to do). |
Digging into this further, it would appear that on this line, |
@doughamlin so what you should have done was open up
to
Now, had the port parsing in the client been correct, that would have yielded the results you were after. I have a fix incoming for this but your config is going to have to look something like this: 'use strict';
module.exports = {
context: __dirname,
entry: ['./app.js', '../../client/index.js?http://localhost:0/'],
output: {
filename: 'bundle.js'
},
devServer: {
overlay: true
}
}; Now you can always omit the My fix is going to change two things:
Once that's in place you should be good to go. Hopefully this will all become moot with 3.x when I get around to refactoring WebSockets and removing the SockJS dependency. Look for the fix to drop in |
@shellscape Works great. Thanks! |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
With #1054, you can start a server with a random port, however adding
overlay: true
to the options doesn't enable the overlay as expected.If the current behavior is a bug, please provide the steps to reproduce.
Modify the
node-api-simple
example to this:Open browser to localhost on the logged port
In
app.js
, uncomment the code that results in an error and save.No overlay appears.
What is the expected behavior?
The overlay appears.
Please mention your webpack and Operating System version.
This commit
macOS 10.12.6
The text was updated successfully, but these errors were encountered: