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

compatibility with both ws and sockjs #96

Closed
snitin315 opened this issue Feb 23, 2022 · 1 comment · Fixed by #105
Closed

compatibility with both ws and sockjs #96

snitin315 opened this issue Feb 23, 2022 · 1 comment · Fixed by #105

Comments

@snitin315
Copy link
Contributor

Currently, the plugin is using the sockjs-client for devServer which was default in webpack-dev-server@3.

import SockJS from 'sockjs-client'

const connection = new SockJS(
`${window.location.protocol}//${
sockOptions.sockHost || window.location.hostname
}:${sockOptions.sockPort || window.location.port}${
sockOptions.sockPath || '/sockjs-node'
}`,
)

webpack-dev-server@v4 changed the default to ws, it would be great if the plugin can support both. Otherwise we have errors in console with webSocketServer: 'ws'

Screenshot 2022-02-21 at 11 15 22 AM

@giladgd
Copy link
Contributor

giladgd commented Nov 13, 2022

Until my fix PR (#105) is merged you can use this workaround:

npm install --save-dev "github:giladgd/error-overlay-webpack-plugin#wsErrorMessageFix/compiled"

This will install a branch I created with the fix and with compiled files to make it work properly as a node module

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