Skip to content
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

Merged
merged 6 commits into from Mar 21, 2019

Conversation

swernerx
Copy link
Contributor

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 not webpack-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.

src/index.js Outdated
class ErrorOverlayPlugin {
apply(compiler) {
const className = this.constructor.name

if (compiler.options.mode !== 'development') return

const enableDevServer = !!compiler.options.devServer
Copy link
Owner

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

@gregberge gregberge merged commit 90caf91 into gregberge:master Mar 21, 2019
@gregberge
Copy link
Owner

Thanks!

@swernerx swernerx deleted the feat/optional-socket-usage branch March 21, 2019 16:23
@swernerx
Copy link
Contributor Author

You are welcome!

@bencooper222
Copy link
Contributor

Is this a breaking change? It doesn't really look like one.

@gregberge
Copy link
Owner

No it is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants