Last active
February 17, 2021 09:15
-
-
Save w-jerome/6e0ce1b61269c8925c6278a25bb11182 to your computer and use it in GitHub Desktop.
HTML/JS - Add javascript module in HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="module"> | |
// NOTE: You literally don't need a build process with preact. | |
import { h, Component, render } from 'https://unpkg.com/preact?module'; | |
const app = h('h1', null, 'Hello World!'); | |
render(app, document.body); | |
</script> | |
<script type="module"> | |
// https://www.skypack.dev/ | |
import confetti from 'https://cdn.skypack.dev/canvas-confetti'; | |
confetti(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment