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

BREAKING CHANGE: switch default transportMode to ws #2531

Merged
merged 10 commits into from
May 4, 2020

Conversation

knagaitsev
Copy link
Collaborator

@knagaitsev knagaitsev commented Apr 22, 2020

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

No

Motivation / Use-Case

switching to ws as default

this may require getting rid of iframe to pass tests since I think iframe mode relies on sockjs

Should the warning that transportMode is an experimental option stay for the moment, or should we get rid of it?

Breaking Changes

ws will be default instead of sockjs

Edit: also changed default sockPath from sockjs-node to ws

Additional Info

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #2531 into v4 will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##               v4    #2531   +/-   ##
=======================================
  Coverage   93.43%   93.43%           
=======================================
  Files          34       34           
  Lines        1309     1309           
  Branches      369      369           
=======================================
  Hits         1223     1223           
  Misses         83       83           
  Partials        3        3           
Impacted Files Coverage Δ
lib/utils/createConfig.js 96.19% <ø> (ø)
lib/utils/getSocketServerImplementation.js 90.47% <ø> (ø)
client-src/default/utils/createSocketUrl.js 100.00% <100.00%> (ø)
lib/Server.js 96.73% <100.00%> (ø)
lib/utils/addEntries.js 100.00% <100.00%> (ø)
lib/utils/normalizeOptions.js 100.00% <100.00%> (ø)
lib/utils/routes.js 92.30% <100.00%> (ø)
lib/utils/updateCompiler.js 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 308ee21...96a53be. Read the comment docs.

@hiroppy hiroppy changed the title chore(ws): switch default transportMode to ws feat(ws): switch default transportMode to ws Apr 22, 2020
@alexander-akait
Copy link
Member

@Loonride hm, CI broken

@alexander-akait
Copy link
Member

/cc @Loonride friendly ping

@knagaitsev
Copy link
Collaborator Author

/cc @Loonride friendly ping

Yes it made sense to get rid of iframe/live mode first, since it relied on sockjs I believe

@knagaitsev knagaitsev changed the title feat(ws): switch default transportMode to ws BREAKING CHANGE: switch default transportMode to ws May 2, 2020
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Great job!

@alexander-akait alexander-akait merged commit 83d4ec3 into webpack:v4 May 4, 2020
alexander-akait pushed a commit that referenced this pull request May 8, 2020
BREAKING CHANGE: switch default transportMode to ws
@p-szm
Copy link

p-szm commented Jun 6, 2022

@Loonride @hiroppy @alexander-akait I've recently upgraded my WDS to 4.x and I stated seeing issues with the websocket randomly dying when the server is running. Switching back to sockjs works, but I'm just curious what was the reason for changing the default to websockets?

@snitin315
Copy link
Member

snitin315 commented Jun 6, 2022

Switching back to sockjs works, but I'm just curious what was the reason for changing the default to websockets?

@patrickszmucer Are you using any 3rd party plugin like the error-overlay-webpack-plugin?

@p-szm
Copy link

p-szm commented Jun 6, 2022

I'm not - I have error overlays disabled and I wrote some custom code that listens to these events and changes the color of my banner to show when the server is ready/reloading/stopped. I noticed that the banner now occasionally flickers between stopped/ready because I'm getting "webscket close" events (with a 1006 status).

@snitin315
Copy link
Member

Please create an issue with reproducible example.

@p-szm
Copy link

p-szm commented Jun 6, 2022

Will do - I just need to collect more details. I was just curious about the motivation for this change :)

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.

5 participants