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

fix(client): hmr on web workers #18554

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

userquin
Copy link
Contributor

@userquin userquin commented Nov 1, 2024

Description

There is a todo in L360 in the client module, should we clear the console?

fixes #5396

/cc @bluwy from your comment here #10262 (comment)

Cannot run vitest run -c vitest.config.e2e.ts (nr test-serve) on my local Windows laptop (I have developer mode enabled and repo cloned using git clone -c core.symlinks=true ... ):

imagen

@userquin userquin changed the title fix(client): HMR on web workers fix(client): hmr on web workers Nov 1, 2024
@userquin
Copy link
Contributor Author

userquin commented Nov 1, 2024

Looks like Windows cannot copy this folder:

imagen

NOTE: using node 20.10.0 LTS => unicode fixed in 20.12.0 => testing with Node 22.6.0 LTS and working

EDIT: running e2e tests with Node 22.6.0 LTS

imagen

await untilUpdated(
() => page.textContent('.simple-worker-url'),
'Hello from simple worker!',
true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

uhmm, I need to review this

Copy link
Contributor Author

@userquin userquin Nov 1, 2024

Choose a reason for hiding this comment

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

looks like we don't test build in CI and so we can just remove the true param here, maybe used in some other test?

Copy link
Contributor Author

@userquin userquin Nov 1, 2024

Choose a reason for hiding this comment

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

the flag used only with isBuild, it doesn't matter if we pass it or not

@userquin
Copy link
Contributor Author

userquin commented Nov 1, 2024

Also checked HMR overlay:

imagen

Copy link
Member

@ArnaudBarre ArnaudBarre left a comment

Choose a reason for hiding this comment

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

I'm very happy that finally someone is looking into this.
But IMO the worker should connect to the main thread and use message passing so that errors and reload works

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.

HMR on service worker
2 participants