deno.land / x / esm@v135_2 / server / embed / hot.html

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>ESM&gt;Hot</title> <link rel="preload" href="/embed/esm-archive.gz" as="fetch" type="application/esm-archive+gzip" crossorigin="anonymous"> </head> <body> <pre id="root">...</pre> <script type="module"> import { hot } from "/hot" hot.onFire(() => { hot.vfs.put( new File(["bar"], "foo.txt", { type: "text/plain" }) ).then(() => { import("/foo.js").then(({ foo }) => { const em = document.createElement("em") em.textContent = foo root.append(em, "...") }) fetch("/@hot/foo.txt").then(r => r.text()).then(text => { const strong = document.createElement("strong") strong.textContent = text root.append(strong, "...") }) }) }).fire({ swScript: "/embed/sw.js" }) </script> </body> </html>
esm

Version Info

Tagged at
a year ago