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
Made socket listener optional (required when using dev-middleware only) #34
Made socket listener optional (required when using dev-middleware only) #34
Conversation
…ract their path once during init
src/index.js
Outdated
class ErrorOverlayPlugin { | ||
apply(compiler) { | ||
const className = this.constructor.name | ||
|
||
if (compiler.options.mode !== 'development') return | ||
|
||
const enableDevServer = !!compiler.options.devServer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enableDevServer
is an action, please rename it to devServerEnabled
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
Thanks! |
You are welcome! |
Is this a breaking change? It doesn't really look like one. |
No it is not. |
This PR makes the socked client optional which was used before for some more detailed error reporting. Unfortunately, this socket is only available when using
webpack-dev-server
and notwebpack-dev-middleware
.The PR splits the entries for a basic integration and the socket listener into two. It then only adds the socket listener entry whenever there is a
devServer
config entry in Webpack.The PR restores the previous behavior of v0.16.x for non-
dev-server
users.