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 @keystatic/astro/api CommonJS output #627

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Sep 7, 2023

Ref: https://thinkmill.slack.com/archives/C04CLQBUF29/p1693987161543119?thread_ts=1693982871.802299&cid=C04CLQBUF29

I'm not quite sure how the CommonJS output was used here but it was and that broke things because Preconstruct outputs import.meta.whatever as undefined in CommonJS (since import.meta is only an ESM thing and it can't really know what else to output there) so this try catches reading from import.meta.env

@changeset-bot
Copy link

changeset-bot bot commented Sep 7, 2023

🦋 Changeset detected

Latest commit: 0f9c538

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

This PR includes changesets to release 1 package
Name Type
@keystatic/astro Patch

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

@vercel
Copy link

vercel bot commented Sep 7, 2023

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

Name Status Preview Comments Updated (UTC)
keystar-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 7, 2023 0:37am
keystatic ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 7, 2023 0:37am
keystatic-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 7, 2023 0:37am

@emmatown emmatown marked this pull request as ready for review September 7, 2023 00:16
@emmatown emmatown requested a review from JedWatson September 7, 2023 00:16
@emmatown emmatown deleted the fix-keystatic-astro-cjs-output branch September 7, 2023 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants