diff --git a/sites/svelte-5-preview/src/lib/Output/CompilerOptions.svelte b/sites/svelte-5-preview/src/lib/Output/CompilerOptions.svelte index 60504c5052..5d6cb85ff6 100644 --- a/sites/svelte-5-preview/src/lib/Output/CompilerOptions.svelte +++ b/sites/svelte-5-preview/src/lib/Output/CompilerOptions.svelte @@ -23,6 +23,12 @@ {$compile_options.dev}, + + }); diff --git a/sites/svelte-5-preview/src/lib/Repl.svelte b/sites/svelte-5-preview/src/lib/Repl.svelte index 80a2b7ff61..fc26fef373 100644 --- a/sites/svelte-5-preview/src/lib/Repl.svelte +++ b/sites/svelte-5-preview/src/lib/Repl.svelte @@ -77,7 +77,8 @@ /** @type {import('svelte/compiler').CompileOptions} */ const DEFAULT_COMPILE_OPTIONS = { generate: 'client', - dev: false + dev: false, + modernAst: true }; /** @type {Map} */ diff --git a/sites/svelte-5-preview/src/lib/workers/compiler/index.js b/sites/svelte-5-preview/src/lib/workers/compiler/index.js index 83dffe1856..6031c09378 100644 --- a/sites/svelte-5-preview/src/lib/workers/compiler/index.js +++ b/sites/svelte-5-preview/src/lib/workers/compiler/index.js @@ -70,7 +70,7 @@ function compile({ id, source, options, return_ast }) { const { js, css, warnings, metadata } = compiled; - const ast = return_ast ? svelte.parse(source, { modern: true }) : undefined; + const ast = return_ast ? svelte.parse(source, { modern: options.modernAst }) : undefined; return { id,