#How do I add script attributes to script tags bundled with Astro?

6 messages · Page 1 of 1 (latest)

spring pivot
#

Say, I've a <script> console.log('something') </script> at the bottom of the layout in astro project. The project bundles it to a hoisted script which is inserted in the head tag, but I'm unable to add the defer attribute to it.

spring pivot
#

yeah the hoisted script is inserted as a src

#

<script type="module" src="/hoisted.73bcf539.js"></script>

this is what I'm getting

#

But just saw this

#

so I think it's good