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

🐛 BUG: Partytown's Integration does not respect Astro's base config option #3432

Closed
1 task done
caioferrarezi opened this issue May 24, 2022 · 2 comments · Fixed by #3437
Closed
1 task done

🐛 BUG: Partytown's Integration does not respect Astro's base config option #3432

caioferrarezi opened this issue May 24, 2022 · 2 comments · Fixed by #3437
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) help wanted Please help with this issue!

Comments

@caioferrarezi
Copy link
Contributor

What version of astro are you using?

v1.0.0-beta.31

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

yarn

What operating system are you using?

Linux

Describe the Bug

With this astro configuration:

export default defineConfig({
  site: 'https://www.example.com',
  base: '/test',
  outDir: './dist/test',
  integrations: [partytown()],
});

Partytown's integration build its files under the dist/test/~partytown/ directory, but the js snippet that it generates does not contain the correct path to load the service worker script.

To reproduce this, just npm run build and npm run preview on the following stackblitz project and you must see this error:
image

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-5ufy4j-st5s17

Participation

  • I am willing to submit a pull request for this issue.
@natemoo-re
Copy link
Member

Thanks for opening an issue! Looks like this should be a pretty simple fix for Astro's integration to automatically modify the lib option to include the configured base.

If you'd be interested in opening a PR to make that happen, that would be greatly appreciated!

@natemoo-re natemoo-re added - P3: minor bug An edge case that only affects very specific usage (priority) s1-small help wanted Please help with this issue! labels May 24, 2022
@caioferrarezi
Copy link
Contributor Author

@natemoo-re nice! I'll do it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) help wanted Please help with this issue!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants