You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import.meta.env is a global in Vite that you can use to grab out environment variables and I happened to write a blog post on that subject but if the content mentions import.meta.envanywhere the build fails. If I remove it, it works fine.
For example, try to compile this file with the latest version of SvelteKit and MDsveX (use npm init svelte@next then npx svelte-add mdsvex):
---title: Foo---
Let's talk about `import.meta.env` in Vite!
Then try to build with npm run build.
I'm reporting here but let me know if this makes more sense in one of the other repos instead.
The text was updated successfully, but these errors were encountered:
I've come across a strange bug with MDsveX (0.10.5) and SvelteKit (1.0.0-next.249).
If you create a MDsveX file with the string
import.meta.env
, then the commandnpm run build
fails with:import.meta.env
is a global in Vite that you can use to grab out environment variables and I happened to write a blog post on that subject but if the content mentionsimport.meta.env
anywhere the build fails. If I remove it, it works fine.For example, try to compile this file with the latest version of SvelteKit and MDsveX (use
npm init svelte@next
thennpx svelte-add mdsvex
):Then try to build with
npm run build
.I'm reporting here but let me know if this makes more sense in one of the other repos instead.
The text was updated successfully, but these errors were encountered: