compiler icon indicating copy to clipboard operation
compiler copied to clipboard

In page frontmatter, an env var condition followed by an import leaves an unterminated string

Open olets opened this issue 8 months ago • 4 comments

Astro Info

My real local example:

Astro                    v4.10.2
Node                     v20.14.0
System                   macOS (arm64)
Package Manager          bun
Output                   server
Adapter                  none
Integrations             none

Minimal reproduction:

Astro                    v4.10.2
Node                     v18.20.3
System                   Linux (x64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             none

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

  • [X] I am willing to submit a pull request for this issue.

olets avatar Jun 16 '24 19:06 olets