Astro doesnβt allow declarations inside embedded markup.π₯
You can embed JS/TS expressions in the markup using curly braces { }
, but not declarations or complex statements. You need to move them to the code fences. βοΈ
See example below: Left code fails β, right code works β
: