Skip to content

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

@lilnasy

Description

@lilnasy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P4: importantViolate documented behavior or significantly improves performance (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions