App.svelte
runes
This component is not in runes mode.
To enable runes mode, either start using runes in your code, or add the following to the top of your component:
<svelte:options runes />9
1
2
3
4
5
6
›
⌄
<script>
let name = 'world';
</script>
<h1>Hello {name}!</h1>
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
import "svelte/internal/disclose-version";
import * as $ from "svelte/internal/client";
var root = $.template(`<h1></h1>`);
export default function App($$anchor) {
let name = 'world';
var h1 = root();
h1.textContent = `Hello ${name ?? ""}!`;
$.append($$anchor, h1);
}
result = svelte.compile(source, {
generate:
});9
1
›
/* Add a <style> tag to see the CSS output */
- {
-
- {
- type: "Script"
- start: 0
- end: 39
- context: "default"
-
} - module:
- css:
}
The AST is not public API and may change at any point in time