withastro / compiler

The Astro compiler. Written in Go. Distributed as WASM.
Other
502 stars 59 forks source link

🐛 BUG: Commented out scripts can crash the compiler #988

Open lilnasy opened 8 months ago

lilnasy commented 8 months ago

What version of @astrojs/compiler are you using?

2.7.0

What package manager are you using?

pnpm

What operating system are you using?

Windows

Describe the Bug

image
runtime error: slice bounds out of range [1:0]
---
import Grid from "../components/Grid"
---
<!-- <script>
import Grid from "../components/Grid"
</script> -->
<Grid client:only/>

Link to Minimal Reproducible Example

Live Astro Compiler