Skip to content

Commit d986094

Browse files
authored
chore: expose HMR option, add disclaimer to compiler options UI (#12386)
* chore: expose HMR option, add disclaimer to compiler options UI * ok prettier whatever you say
1 parent f3f4ce5 commit d986094

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

sites/svelte-5-preview/src/lib/Output/CompilerOptions.svelte

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,22 @@
3333
<Checkbox bind:checked={$compile_options.dev} />
3434
<span class="boolean">{$compile_options.dev}</span>,
3535
</label>
36+
37+
<label class="option">
38+
<span class="key">hmr:</span>
39+
<Checkbox bind:checked={$compile_options.hmr} />
40+
<span class="boolean">{$compile_options.hmr}</span>,
41+
</label>
3642
});
3743
</div>
3844

45+
<div class="note">
46+
<p>
47+
note: these options affect the JS output tab, but not the bundle that executes in the Result
48+
tab.
49+
</p>
50+
</div>
51+
3952
<style>
4053
.options {
4154
padding: 0 10px;
@@ -132,4 +145,13 @@
132145
border: 1px solid var(--sk-theme-2);
133146
transition: box-shadow 0.2s ease-out;
134147
}
148+
149+
.note {
150+
padding: 10px;
151+
}
152+
153+
.note p {
154+
font-size: 1.4rem;
155+
text-wrap: balance;
156+
}
135157
</style>

sites/svelte-5-preview/src/lib/Repl.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
const DEFAULT_COMPILE_OPTIONS = {
7979
generate: 'client',
8080
dev: false,
81+
hmr: false,
8182
css: 'external'
8283
};
8384

0 commit comments

Comments
 (0)