-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 "serviceWorker.js" path #3829
Conversation
Hey @cuining - thanks for the PR! That change was intentional as part of the migration away from Parcel. Please see these PRs:
I'm going to close this but if you find the issues with the service worker and believe this is the root cause, let us know! |
Update: you were right! Thank you for catching this and opening the PR. Sorry for closing it too quickly! I'll see if I can push a commit to fix any failing tests. |
Hmm...I'm struggling to push a change. @cuining Do you know if "Allow edits from maintainers" is checked? Here is the needed change: diff --git a/test/unit/browser/register.test.ts b/test/unit/browser/register.test.ts
index 6d1443f1..f2302cb8 100644
--- a/test/unit/browser/register.test.ts
+++ b/test/unit/browser/register.test.ts
@@ -155,7 +155,7 @@ describe("register", () => {
await registerServiceWorker()
expect(mockFn).toBeCalled()
- expect(serviceWorkerPath).toMatch(`${csStaticBasePath}/dist/serviceWorker.js`)
+ expect(serviceWorkerPath).toMatch(`${csStaticBasePath}/out/browser/serviceWorker.js`)
expect(serviceWorkerScope).toMatch("/")
})
it("should register when options.base is defined", async () => {
@@ -176,7 +176,7 @@ describe("register", () => {
await registerServiceWorker()
expect(mockFn).toBeCalled()
- expect(serviceWorkerPath).toMatch(`/dist/serviceWorker.js`)
+ expect(serviceWorkerPath).toMatch(`/out/browser/serviceWorker.js`)
expect(serviceWorkerScope).toMatch("/")
})
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should fix the issue but we need to update the tests. See PR comments for fix!
Codecov Report
@@ Coverage Diff @@
## main #3829 +/- ##
==========================================
+ Coverage 62.05% 62.60% +0.55%
==========================================
Files 36 36
Lines 1863 1872 +9
Branches 378 379 +1
==========================================
+ Hits 1156 1172 +16
+ Misses 601 595 -6
+ Partials 106 105 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks again @cuining 🎉 (and sorry again for closing before)
We really appreciate you proactively fixing this
3.10.2 had this folder, but it was removed in version 3.11.0
cc @jsjoeio