|
| 1 | +<!doctype html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <title>Buildless Svelte 5 app</title> |
| 6 | + <script type="importmap"> |
| 7 | + { |
| 8 | + "imports": { |
| 9 | + "@jridgewell/gen-mapping": "https://esm.sh/*@jridgewell/gen-mapping@0.3.13?dev", |
| 10 | + "@jridgewell/remapping": "https://esm.sh/*@jridgewell/remapping@2.3.5?dev", |
| 11 | + "@jridgewell/resolve-uri": "https://esm.sh/*@jridgewell/resolve-uri@3.1.2?dev", |
| 12 | + "@jridgewell/sourcemap-codec": "https://esm.sh/*@jridgewell/sourcemap-codec@1.5.5?dev", |
| 13 | + "@jridgewell/trace-mapping": "https://esm.sh/*@jridgewell/trace-mapping@0.3.31?dev", |
| 14 | + "@sveltejs/acorn-typescript": "https://esm.sh/*@sveltejs/acorn-typescript@1.0.6?dev", |
| 15 | + "acorn": "https://esm.sh/*acorn@8.15.0?dev", |
| 16 | + "aria-query": "https://esm.sh/*aria-query@5.3.2?dev", |
| 17 | + "axobject-query": "https://esm.sh/*axobject-query@4.1.0?dev", |
| 18 | + "clsx": "https://esm.sh/*clsx@2.1.1?dev", |
| 19 | + "esrap": "https://esm.sh/*esrap@2.1.2?dev", |
| 20 | + "esrap/": "https://esm.sh/*esrap@2.1.2&dev/", |
| 21 | + "is-reference": "https://esm.sh/*is-reference@3.0.3?dev", |
| 22 | + "locate-character": "https://esm.sh/*locate-character@3.0.0?dev", |
| 23 | + "magic-string": "https://esm.sh/*magic-string@0.30.21?dev", |
| 24 | + "svelte": "https://esm.sh/*svelte@5.43.6?dev", |
| 25 | + "svelte/": "https://esm.sh/*svelte@5.43.6&dev/", |
| 26 | + "zimmerframe": "https://esm.sh/*zimmerframe@1.1.4?dev" |
| 27 | + } |
| 28 | + } |
| 29 | + </script> |
| 30 | + <script type="module"> |
| 31 | + import { mount } from "svelte"; |
| 32 | + import { compile } from "svelte/compiler"; |
| 33 | + |
| 34 | + const source = await fetch("./App.svelte").then((res) => res.text()); |
| 35 | + const result = compile(source, { generate: "client" }); |
| 36 | + const { default: App } = await import( |
| 37 | + URL.createObjectURL( |
| 38 | + new Blob([result.js.code], { type: "text/javascript" }), |
| 39 | + ) |
| 40 | + ); |
| 41 | + mount(App, { target: document.body }); |
| 42 | + </script> |
| 43 | + </head> |
| 44 | + <body></body> |
| 45 | +</html> |
0 commit comments