pull/16197/head
Rich Harris 4 months ago
parent 7dc2019e3f
commit a2bc5f7d34

@ -59,6 +59,9 @@
"./internal/disclose-version": {
"default": "./src/internal/disclose-version.js"
},
"./internal/flags/async": {
"default": "./src/internal/flags/async.js"
},
"./internal/flags/legacy": {
"default": "./src/internal/flags/legacy.js"
},

@ -563,6 +563,10 @@ export function client_component(analysis, options) {
);
}
if (options.experimental.async) {
body.unshift(b.imports([], 'svelte/internal/flags/async'));
}
if (!analysis.runes) {
body.unshift(b.imports([], 'svelte/internal/flags/legacy'));
}

@ -6,7 +6,7 @@ import { is_array } from './internal/shared/utils.js';
import { user_effect } from './internal/client/index.js';
import * as e from './internal/client/errors.js';
import { lifecycle_outside_component } from './internal/shared/errors.js';
import { legacy_mode_flag } from './internal/flags/index.js';
import { async_mode_flag, legacy_mode_flag } from './internal/flags/index.js';
import { component_context } from './internal/client/context.js';
import { DEV } from 'esm-env';

@ -30,6 +30,7 @@ import * as w from './warnings.js';
import * as e from './errors.js';
import { assign_nodes } from './dom/template.js';
import { is_passive_event } from '../../utils.js';
import { async_mode_flag } from '../flags/index.js';
/**
* This is normally true block effects should run their intro transitions

@ -0,0 +1,3 @@
import { enable_async_mode_flag } from './index.js';
enable_async_mode_flag();

@ -1,6 +1,11 @@
export let async_mode_flag = false;
export let legacy_mode_flag = false;
export let tracing_mode_flag = false;
export function enable_async_mode_flag() {
async_mode_flag = true;
}
export function enable_legacy_mode_flag() {
legacy_mode_flag = true;
}

@ -173,7 +173,7 @@ async function common_setup(cwd: string, runes: boolean | undefined, config: Run
dev: force_hmr ? true : undefined,
hmr: force_hmr ? true : undefined,
experimental: {
async: true
async: runes
},
fragments,
...config.compileOptions,

Loading…
Cancel
Save