compiler
compiler copied to clipboard
🐛 BUG: The compiler doesn't parse fragments correctly
What version of @astrojs/compiler are you using?
0.23.1
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
The following snippet that contains a fragment and is placed inside the <head> tag will cause the compiler to return the wrong AST. The build result file doesn't have the <body> tag, and the new <meta> tag is outside of the <head> tag.
{testBool && (<><meta name="description" content="test" /></>)}
Please consult the minimal reproducible example. It's the "Just the basic" template with only the above snippet added to the <Head> tag of the Layout.astro file.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-vqwenf?file=src/layouts/Layout.astro