-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
🐛 BUG: Partytown integration does not work with some SSR adaptors #3668
Comments
Thanks for the thorough explanation @nrgnrg! I agree this should be handled better on the integration side. Personally, I think adding partytown assets to the manifest is worth investigating over the workaround you mentioned. We'd need to investigate how possible this is though. |
@nrgnrg can you try this with |
@matthewp looks like this is still an issue |
It's possible that type of integration does not currently work in SSR. I'll look into it. |
I think the issue is here astro/packages/integrations/partytown/src/index.ts Lines 49 to 51 in b9f891b
it copies over the files into to the build folder on |
@nrgnrg do they get added to the page though? And 404 from there? |
it looks like a script tag gets added to the head which I think is initiating the request |
PR: #3686 |
amazing! 👌 |
What version of
astro
are you using?^1.0.0-beta.47
Are you using an SSR adapter? If so, which one?
netlify, cloudflare
What package manager are you using?
pnpm
What operating system are you using?
Mac
Describe the Bug
Both the Netlify and Cloudflare adaptors serve static assets by deferring the request to the platform, they do this by first checking if the request is for something that exists in the manifest from the
createExports
args.the
manifest.assets.has(pathname)
fails for partytown assets because the partytown static assets do not exist in the manifest and thus they 404.I'm not sure wether this is a bug in the partytown integration or wether the adaptors should handle this better.
Partytown could be special cased in the adaptors or the check could be more forgiving with a regex like so:
/\.\w+$/.test(pathname)
. Although both are a workaround.Link to Minimal Reproducible Example
I tried to set this up in a repro but was having difficulties, I can give it another go if this isn't clear enough.
Participation
The text was updated successfully, but these errors were encountered: