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: build service worker without writing it to FS #20909

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Jan 24, 2025

Description

#20894 reintroduced #13123 where the service worker build would cause a server restart in dev mode. This PR fixes this issue again.

Type of change

  • Bugfix

@vursen vursen requested review from tepi and Artur- January 24, 2025 11:54
},
async load(id) {
if (id.endsWith('sw.js')) {
return buildOutput.output[0].code;
Copy link
Contributor Author

@vursen vursen Jan 24, 2025

Choose a reason for hiding this comment

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

note: The output code already includes a sourcemap link, so there is no need to return sourcemaps separately in transform(code, id) as it was done previously.

Copy link

Test Results

1 165 files  ± 0  1 165 suites  ±0   1h 33m 3s ⏱️ - 6m 36s
7 625 tests ± 0  7 569 ✅ + 1  56 💤 ±0  0 ❌ ±0 
7 923 runs   - 11  7 860 ✅  - 10  63 💤 ±0  0 ❌ ±0 

Results for commit 5436d32. ± Comparison against base commit 9f4eceb.

@tepi tepi merged commit 7350de9 into main Jan 27, 2025
27 of 42 checks passed
@tepi tepi deleted the build-sw-without-writing branch January 27, 2025 08:42
@vaadin-bot
Copy link
Collaborator

Hi @vursen and @tepi, when i performed cherry-pick to this commit to 24.5, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick 7350de9
error: could not apply 7350de9... fix: build service worker without writing it to FS (#20909)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.7.0.alpha6 and is also targeting the upcoming stable 24.7.0 version.

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

Successfully merging this pull request may close these issues.

4 participants