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

Astro Partytown not resolved correctly with base path config in SSR node standalone #5424

Closed
1 task
harrytran998 opened this issue Nov 17, 2022 · 2 comments
Closed
1 task
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@harrytran998
Copy link

harrytran998 commented Nov 17, 2022

What version of astro are you using?

lastest

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

node

What package manager are you using?

yarn 3

What operating system are you using?

Mac

Describe the Bug

export default defineConfig({
  output: 'server',
  base: '/ok',
  server: {
    port: 3000,
    host: '0.0.0.0',
  },
  adapter: node({
    mode: 'standalone',
  }),
  integrations: [
     ...,
    AstroPartytown({ 
      config: { debug: true, forward: ['dataLayer.push'] }
    }),
],
})

When running dev or server mode --> Display this error in terminal

[serve] 404 /~partytown/debug/partytown-sw.js

And display this error in the browser

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

Link to Minimal Reproducible Example

This link stackblitz https://stackblitz.com/github/harrytran998/reproduction-astro-base-path?file=package.json

This link to Github if case Stackblitz does not work https://github.com/harrytran998/reproduction-astro-base-path

Participation

  • I am willing to submit a pull request for this issue.
@harrytran998 harrytran998 changed the title Astro Partytown not resolved correctly with base path config Astro Partytown not resolved correctly with base path config in SSR node standalone Nov 17, 2022
@matthewp matthewp added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Nov 17, 2022
@matthewp
Copy link
Contributor

fixed by #5425

@harrytran998
Copy link
Author

@matthewp Do you have the plan to release this 😁?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

No branches or pull requests

2 participants