fix(astro): Accessing import.meta at build causes app to break - #3675
Conversation
🦋 Changeset detectedLatest commit: 282cce2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
!snapshot |
|
Hey @panteliselef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/astro@0.0.2-snapshot.v282cce2 --save-exact
npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact
npm i @clerk/testing@1.1.10-snapshot.v282cce2 --save-exact |
wobsoriano
left a comment
There was a problem hiding this comment.
I can confirm the error and it's probably the best to use the command property to check for the current environment instead.
Turns out, Astro config does not run inside Vite so import.meta.env won't work
|
I've verified with the snapshot that this PR fixes the issue. |
Description
Pretty much what the title says
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change