QwikDev / partytown

Relocate resource intensive third-party scripts off of the main thread and into a web worker. 🎉
https://partytown.qwik.dev
MIT License
13.09k stars 437 forks source link

[🐞] How to setup correctly partytown for astro.js #605

Open Lodo4ka opened 5 months ago

Lodo4ka commented 5 months ago

Describe the bug

Hello, I have partytown not working in my astro.js project. I try to run it from the official integration and it doesn't work https://docs.astro.build/en/guides/integrations-guide/partytown/

All the time I get an error in the service worker file ~partytown/partytown-sandbox-sw.html

Even if I add html partytown-sandbox-sw.html then I get debug/proxytown 404 error.

Can you tell me how to configure partytown correctly?

Translated with DeepL.com (free version)

Reproduction

https://renan-refrigeracao-hazel.vercel.app/#inicio

Steps to reproduce

my configuration for astro

partytown({ config: { forward: ['dataLayer.push', 'fbq', 'ym'], lib: '/blog/', debug: false }, }),

Browser Info

chrome

Additional Information

No response

lassespilling commented 3 months ago

I have the same issue in my Astro config using Cloudflare Adapter

datapolitical commented 1 month ago

Did you ever figure this out?