Skip to content

Commit 855e667

Browse files
authored
default to runes mode in tutorial (#1273)
1 parent ff06072 commit 855e667

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

apps/svelte.dev/src/lib/tutorial/adapters/rollup/index.svelte.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export async function create(): Promise<Adapter> {
3333
.map((f) => ({ ...f, name: f.name.slice(9) })),
3434
{
3535
// TODO support Tailwind here?
36+
runes: true
3637
}
3738
);
3839
}

packages/repl/src/lib/Bundler.svelte.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { BundleResult } from './public';
2+
import type { BundleOptions } from './workers/workers';
23
import type { File } from './Workspace.svelte';
34

45
let uid = 1;
@@ -46,7 +47,7 @@ export default class Bundler {
4647
this.#worker.postMessage({ type: 'init', svelte_version });
4748
}
4849

49-
bundle(files: File[], options: { tailwind?: boolean }) {
50+
bundle(files: File[], options: BundleOptions) {
5051
this.#worker.postMessage({
5152
uid,
5253
type: 'bundle',

packages/repl/src/lib/workers/bundler/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ async function get_bundle(
290290
const compilerOptions: any = {
291291
filename: name + '.svelte',
292292
generate: Number(svelte.VERSION.split('.')[0]) >= 5 ? 'client' : 'dom',
293-
dev: true
293+
dev: true,
294+
runes: options.runes
294295
};
295296

296297
if (can_use_experimental_async) {

packages/repl/src/lib/workers/workers.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export interface MigrateOutput {
5050
}
5151

5252
export interface BundleOptions {
53-
tailwind: boolean;
53+
tailwind?: boolean;
54+
runes?: boolean;
5455
}
5556

5657
export type BundleMessageData = {

0 commit comments

Comments
 (0)