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: partytown base path #5425

Merged
merged 2 commits into from
Nov 17, 2022
Merged

Conversation

brenelz
Copy link
Contributor

@brenelz brenelz commented Nov 17, 2022

Closes issue #5424

Changes

When serving up the partytown-sandbox-sw.js it is already scoped to the base path. The code that matches the request url is at the following.

https://github.com/withastro/astro/blob/main/packages/integrations/partytown/src/sirv.ts#L209

Testing

I was able to reproduce the problem locally and then tinkered around a bit until I figured out the problem. Might need some more tesing since I am still very new.

Docs

Shouldn't have any effect on the docs. It is just a fix with the expected behavior.

@changeset-bot
Copy link

changeset-bot bot commented Nov 17, 2022

🦋 Changeset detected

Latest commit: 8171da3

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Nov 17, 2022
@matthewp
Copy link
Contributor

Thanks @brenelz! Can you add a changeset? pnpm changeset. This would be a patch I believe.

@brenelz
Copy link
Contributor Author

brenelz commented Nov 17, 2022

Thanks @brenelz! Can you add a changeset? pnpm changeset. This would be a patch I believe.

Okay I've added one. Hopefully I did it right

@joshuaiz
Copy link

Still seeing the issue mentioned in #5424:

bad HTTP response code (404) was received when fetching the script.
TypeError: Failed to register a ServiceWorker for scope ('http://localhost:5555/~partytown/debug/') with script ('http://localhost:5555/~partytown/debug/partytown-sw.js'): A bad HTTP response code (404) was received when fetching the script.

Is this something else?

@dsacramone
Copy link

@joshuaiz Did you solve this, I am seeing this exact error now....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants