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.1k stars 437 forks source link

fix: add ability to use partytown with scripts with relative paths #631

Open azat-io opened 1 month ago

azat-io commented 1 month ago

What is it?

Description

Hi. Thanks for your cool project!

I am currently having a problem when using the script on sites with relative paths. The site I'm working on is published on different domains and has different paths.

For this reason I currently have to use a hack in my Rspack config:

partytownSnippet: partytownSnippet({
  lib: './',
}).replace('"/"', '"."'),

The current PR adds the ability to use it with relative paths.

Checklist:

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
partytown ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 8:25pm