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
Wonder if what you saw is this other unexpected behavior I noticed in the stackblitz but not in my app: if you fix the problem by for example commenting out the if line, and then reintroduce it for example by uncommenting it, the fix sticks — the app continues to build. That does not happen for me in my real app. If I comment out the import, start my app, and uncomment the import, the dev process breaks.
const$$stdin=$$createComponent(($$result,$$props,$$slots)=>{// good// if (true) {}// good// console.log(import.meta.env.VITE_DEV)// badif(import.meta.env.DEV){}/***necessaryforbug*
' // <----- the problem
return$$render``;},'<stdin>',undefined);exportdefault$$stdin;
Editing the DEV keyword to DEVVVV or something long/short reveals it's some sort of slicing issue.
Astro Info
My real local example:
Minimal reproduction:
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
In page frontmatter, an env var condition followed by an import leaves an unterminated string, which breaks the rest of the page.
Checking the participation box because I'm willing, but it doesn't feel like my wheelhouse.
What's the expected result?
Env var use in frontmatter is not more restricted than the use of other values.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-nfmb4n?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: