astro/examples/fast-build/src/components/InlineHoisted.astro
Matthew Phillips f2b8372c0c
Supports hoisted scripts in the static build (#2414)
* Supports hoisted scripts in the static build

* Adds a changeset

* Update packages/astro/src/core/build/internal.ts

Co-authored-by: Evan Boehs <evan@boehs.org>

* Update based on feedback

* Fix lint

* Fix getting hoist script for Windows

* Try with the pre compiler

* use compiler 0.8.2

* update compiler version

* update yarn.lock

Co-authored-by: Evan Boehs <evan@boehs.org>
2022-01-20 19:13:05 -05:00

13 lines
254 B
Text

<script type="module" hoist>
import { h, render } from 'preact';
const mount = document.querySelector('#inline-hoist');
function App() {
return h('strong', null, 'Hello again');
}
render(h(App), mount);
</script>
<div id="inline-hoist"></div>