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

fix: make adapter the last element of integrations instead of the first #12870

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kang-Jh
Copy link

@Kang-Jh Kang-Jh commented Jan 1, 2025

Change

Testing

I tested locally using reproduction repo in #12832

Docs

/cc @withastro/maintainers-docs for feedback!

Copy link

changeset-bot bot commented Jan 1, 2025

🦋 Changeset detected

Latest commit: d2d1802

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 1, 2025
Copy link

codspeed-hq bot commented Jan 1, 2025

CodSpeed Performance Report

Merging #12870 will not alter performance

Comparing Kang-Jh:main (d2d1802) with main (70a9f0b)

Summary

✅ 4 untouched benchmarks

@ematipico
Copy link
Member

We can't accept this change, because it reverts a change we did while back to fix another bug.

Now, what's the actual issue? Why is the order important for the partytown integration?

@Kang-Jh
Copy link
Author

Kang-Jh commented Jan 2, 2025

@ematipico
The Partytown integration copies the Partytown JavaScript file to the output directory (/dist), and the Vercel adapter copies the files from the /dist directory to the .vercel/output directory. However, since the Vercel adapter is executed first, the Partytown JavaScript file is not copied into the .vercel/output directory because the Vercel adapter process terminates beforehand.

@Kang-Jh
Copy link
Author

Kang-Jh commented Jan 2, 2025

Hmm, if the current change isn't acceptable, I have to dig into it to fix this without the current change.

@ematipico
Copy link
Member

ematipico commented Jan 2, 2025

The bug is the same as withastro/adapters#445

Different output directories. As a current workaround, you need to move the files yourself

@Kang-Jh
Copy link
Author

Kang-Jh commented Jan 4, 2025

@ematipico Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

partytown integration doesn't work with vercel adapter in production
2 participants