svelte 5.53.13 → 5.54.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiler/index.js +1 -1
- package/package.json +1 -1
- package/src/compiler/index.js +4 -1
- package/src/compiler/migrate/index.js +2 -0
- package/src/compiler/phases/2-analyze/index.js +42 -15
- package/src/compiler/phases/3-transform/client/transform-client.js +1 -1
- package/src/compiler/phases/3-transform/css/index.js +1 -1
- package/src/compiler/phases/3-transform/server/transform-server.js +1 -1
- package/src/compiler/phases/3-transform/shared/transform-async.js +72 -52
- package/src/compiler/print/index.js +7 -2
- package/src/compiler/validate-options.js +55 -18
- package/src/internal/client/dev/hmr.js +17 -8
- package/src/internal/client/reactivity/async.js +12 -11
- package/src/internal/client/reactivity/batch.js +117 -31
- package/src/internal/client/reactivity/deriveds.js +22 -9
- package/src/internal/client/reactivity/effects.js +1 -0
- package/src/internal/client/runtime.js +15 -13
- package/src/version.js +1 -1
- package/types/index.d.ts +14 -6
- package/types/index.d.ts.map +1 -1
|
@@ -90,20 +90,20 @@ var source_stacks = DEV ? new Set() : null;
|
|
|
90
90
|
let uid = 1;
|
|
91
91
|
|
|
92
92
|
export class Batch {
|
|
93
|
-
// for debugging. TODO remove once async is stable
|
|
94
93
|
id = uid++;
|
|
95
94
|
|
|
96
95
|
/**
|
|
97
|
-
* The current values of any
|
|
96
|
+
* The current values of any signals that are updated in this batch.
|
|
97
|
+
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
|
|
98
98
|
* They keys of this map are identical to `this.#previous`
|
|
99
|
-
* @type {Map<
|
|
99
|
+
* @type {Map<Value, [any, boolean]>}
|
|
100
100
|
*/
|
|
101
101
|
current = new Map();
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
104
|
+
* The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
|
|
105
105
|
* They keys of this map are identical to `this.#current`
|
|
106
|
-
* @type {Map<
|
|
106
|
+
* @type {Map<Value, any>}
|
|
107
107
|
*/
|
|
108
108
|
previous = new Map();
|
|
109
109
|
|
|
@@ -121,14 +121,16 @@ export class Batch {
|
|
|
121
121
|
#discard_callbacks = new Set();
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
124
|
+
* Async effects that are currently in flight
|
|
125
|
+
* @type {Map<Effect, number>}
|
|
125
126
|
*/
|
|
126
|
-
#pending =
|
|
127
|
+
#pending = new Map();
|
|
127
128
|
|
|
128
129
|
/**
|
|
129
|
-
*
|
|
130
|
+
* Async effects that are currently in flight, _not_ inside a pending boundary
|
|
131
|
+
* @type {Map<Effect, number>}
|
|
130
132
|
*/
|
|
131
|
-
#blocking_pending =
|
|
133
|
+
#blocking_pending = new Map();
|
|
132
134
|
|
|
133
135
|
/**
|
|
134
136
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
@@ -168,8 +170,35 @@ export class Batch {
|
|
|
168
170
|
|
|
169
171
|
#decrement_queued = false;
|
|
170
172
|
|
|
173
|
+
/** @type {Set<Batch>} */
|
|
174
|
+
#blockers = new Set();
|
|
175
|
+
|
|
171
176
|
#is_deferred() {
|
|
172
|
-
return this.is_fork || this.#blocking_pending > 0;
|
|
177
|
+
return this.is_fork || this.#blocking_pending.size > 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
#is_blocked() {
|
|
181
|
+
for (const batch of this.#blockers) {
|
|
182
|
+
for (const effect of batch.#blocking_pending.keys()) {
|
|
183
|
+
var skipped = false;
|
|
184
|
+
var e = effect;
|
|
185
|
+
|
|
186
|
+
while (e.parent !== null) {
|
|
187
|
+
if (this.#skipped_branches.has(e)) {
|
|
188
|
+
skipped = true;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
e = e.parent;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (!skipped) {
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return false;
|
|
173
202
|
}
|
|
174
203
|
|
|
175
204
|
/**
|
|
@@ -264,7 +293,7 @@ export class Batch {
|
|
|
264
293
|
collected_effects = null;
|
|
265
294
|
legacy_updates = null;
|
|
266
295
|
|
|
267
|
-
if (this.#is_deferred()) {
|
|
296
|
+
if (this.#is_deferred() || this.#is_blocked()) {
|
|
268
297
|
this.#defer_effects(render_effects);
|
|
269
298
|
this.#defer_effects(effects);
|
|
270
299
|
|
|
@@ -272,7 +301,7 @@ export class Batch {
|
|
|
272
301
|
reset_branch(e, t);
|
|
273
302
|
}
|
|
274
303
|
} else {
|
|
275
|
-
if (this.#pending === 0) {
|
|
304
|
+
if (this.#pending.size === 0) {
|
|
276
305
|
batches.delete(this);
|
|
277
306
|
}
|
|
278
307
|
|
|
@@ -383,17 +412,18 @@ export class Batch {
|
|
|
383
412
|
/**
|
|
384
413
|
* Associate a change to a given source with the current
|
|
385
414
|
* batch, noting its previous and current values
|
|
386
|
-
* @param {
|
|
415
|
+
* @param {Value} source
|
|
387
416
|
* @param {any} old_value
|
|
417
|
+
* @param {boolean} [is_derived]
|
|
388
418
|
*/
|
|
389
|
-
capture(source, old_value) {
|
|
419
|
+
capture(source, old_value, is_derived = false) {
|
|
390
420
|
if (old_value !== UNINITIALIZED && !this.previous.has(source)) {
|
|
391
421
|
this.previous.set(source, old_value);
|
|
392
422
|
}
|
|
393
423
|
|
|
394
424
|
// Don't save errors in `batch_values`, or they won't be thrown in `runtime.js#get`
|
|
395
425
|
if ((source.f & ERROR_VALUE) === 0) {
|
|
396
|
-
this.current.set(source, source.v);
|
|
426
|
+
this.current.set(source, [source.v, is_derived]);
|
|
397
427
|
batch_values?.set(source, source.v);
|
|
398
428
|
}
|
|
399
429
|
}
|
|
@@ -453,11 +483,13 @@ export class Batch {
|
|
|
453
483
|
/** @type {Source[]} */
|
|
454
484
|
var sources = [];
|
|
455
485
|
|
|
456
|
-
for (const [source, value] of this.current) {
|
|
486
|
+
for (const [source, [value, is_derived]] of this.current) {
|
|
457
487
|
if (batch.current.has(source)) {
|
|
458
|
-
|
|
488
|
+
var batch_value = /** @type {[any, boolean]} */ (batch.current.get(source))[0]; // faster than destructuring
|
|
489
|
+
|
|
490
|
+
if (is_earlier && value !== batch_value) {
|
|
459
491
|
// bring the value up to date
|
|
460
|
-
batch.current.set(source, value);
|
|
492
|
+
batch.current.set(source, [value, is_derived]);
|
|
461
493
|
} else {
|
|
462
494
|
// same value or later batch has more recent value,
|
|
463
495
|
// no need to re-run these effects
|
|
@@ -507,24 +539,56 @@ export class Batch {
|
|
|
507
539
|
batch.deactivate();
|
|
508
540
|
}
|
|
509
541
|
}
|
|
542
|
+
|
|
543
|
+
for (const batch of batches) {
|
|
544
|
+
if (batch.#blockers.has(this)) {
|
|
545
|
+
batch.#blockers.delete(this);
|
|
546
|
+
|
|
547
|
+
if (batch.#blockers.size === 0 && !batch.#is_deferred()) {
|
|
548
|
+
batch.activate();
|
|
549
|
+
batch.#process();
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
510
553
|
}
|
|
511
554
|
|
|
512
555
|
/**
|
|
513
|
-
*
|
|
514
556
|
* @param {boolean} blocking
|
|
557
|
+
* @param {Effect} effect
|
|
515
558
|
*/
|
|
516
|
-
increment(blocking) {
|
|
517
|
-
this.#pending
|
|
518
|
-
|
|
559
|
+
increment(blocking, effect) {
|
|
560
|
+
let pending_count = this.#pending.get(effect) ?? 0;
|
|
561
|
+
this.#pending.set(effect, pending_count + 1);
|
|
562
|
+
|
|
563
|
+
if (blocking) {
|
|
564
|
+
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
565
|
+
this.#blocking_pending.set(effect, blocking_pending_count + 1);
|
|
566
|
+
}
|
|
519
567
|
}
|
|
520
568
|
|
|
521
569
|
/**
|
|
522
570
|
* @param {boolean} blocking
|
|
571
|
+
* @param {Effect} effect
|
|
523
572
|
* @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)
|
|
524
573
|
*/
|
|
525
|
-
decrement(blocking, skip) {
|
|
526
|
-
this.#pending
|
|
527
|
-
|
|
574
|
+
decrement(blocking, effect, skip) {
|
|
575
|
+
let pending_count = this.#pending.get(effect) ?? 0;
|
|
576
|
+
|
|
577
|
+
if (pending_count === 1) {
|
|
578
|
+
this.#pending.delete(effect);
|
|
579
|
+
} else {
|
|
580
|
+
this.#pending.set(effect, pending_count - 1);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
if (blocking) {
|
|
584
|
+
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
585
|
+
|
|
586
|
+
if (blocking_pending_count === 1) {
|
|
587
|
+
this.#blocking_pending.delete(effect);
|
|
588
|
+
} else {
|
|
589
|
+
this.#blocking_pending.set(effect, blocking_pending_count - 1);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
528
592
|
|
|
529
593
|
if (this.#decrement_queued || skip) return;
|
|
530
594
|
this.#decrement_queued = true;
|
|
@@ -597,15 +661,37 @@ export class Batch {
|
|
|
597
661
|
|
|
598
662
|
// if there are multiple batches, we are 'time travelling' —
|
|
599
663
|
// we need to override values with the ones in this batch...
|
|
600
|
-
batch_values = new Map(
|
|
664
|
+
batch_values = new Map();
|
|
665
|
+
for (const [source, [value]] of this.current) {
|
|
666
|
+
batch_values.set(source, value);
|
|
667
|
+
}
|
|
601
668
|
|
|
602
|
-
// ...and undo changes belonging to other batches
|
|
669
|
+
// ...and undo changes belonging to other batches unless they block this one
|
|
603
670
|
for (const batch of batches) {
|
|
604
671
|
if (batch === this || batch.is_fork) continue;
|
|
605
672
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
673
|
+
// A batch is blocked on an earlier batch if it overlaps with the earlier batch's changes but is not a superset
|
|
674
|
+
var intersects = false;
|
|
675
|
+
var differs = false;
|
|
676
|
+
|
|
677
|
+
if (batch.id < this.id) {
|
|
678
|
+
for (const [source, [, is_derived]] of batch.current) {
|
|
679
|
+
// Derived values don't partake in the blocking mechanism, because a derived could
|
|
680
|
+
// be triggered in one batch already but not the other one yet, causing a false-positive
|
|
681
|
+
if (is_derived) continue;
|
|
682
|
+
|
|
683
|
+
intersects ||= this.current.has(source);
|
|
684
|
+
differs ||= !this.current.has(source);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
if (intersects && differs) {
|
|
689
|
+
this.#blockers.add(batch);
|
|
690
|
+
} else {
|
|
691
|
+
for (const [source, previous] of batch.previous) {
|
|
692
|
+
if (!batch_values.has(source)) {
|
|
693
|
+
batch_values.set(source, previous);
|
|
694
|
+
}
|
|
609
695
|
}
|
|
610
696
|
}
|
|
611
697
|
}
|
|
@@ -1065,7 +1151,7 @@ export function fork(fn) {
|
|
|
1065
1151
|
batch.is_fork = false;
|
|
1066
1152
|
|
|
1067
1153
|
// apply changes and update write versions so deriveds see the change
|
|
1068
|
-
for (var [source, value] of batch.current) {
|
|
1154
|
+
for (var [source, [value]] of batch.current) {
|
|
1069
1155
|
source.v = value;
|
|
1070
1156
|
source.wv = increment_write_version();
|
|
1071
1157
|
}
|
|
@@ -45,12 +45,16 @@ import { increment_pending, unset_context } from './async.js';
|
|
|
45
45
|
import { deferred, includes, noop } from '../../shared/utils.js';
|
|
46
46
|
import { set_signal_status, update_derived_status } from './status.js';
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
|
|
48
|
+
/**
|
|
49
|
+
* This allows us to track 'reactivity loss' that occurs when signals
|
|
50
|
+
* are read after a non-context-restoring `await`. Dev-only
|
|
51
|
+
* @type {{ effect: Effect, warned: boolean } | null}
|
|
52
|
+
*/
|
|
53
|
+
export let reactivity_loss_tracker = null;
|
|
50
54
|
|
|
51
|
-
/** @param {Effect | null} v */
|
|
52
|
-
export function
|
|
53
|
-
|
|
55
|
+
/** @param {{ effect: Effect, warned: boolean } | null} v */
|
|
56
|
+
export function set_reactivity_loss_tracker(v) {
|
|
57
|
+
reactivity_loss_tracker = v;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
export const recent_async_deriveds = new Set();
|
|
@@ -124,7 +128,12 @@ export function async_derived(fn, label, location) {
|
|
|
124
128
|
var deferreds = new Map();
|
|
125
129
|
|
|
126
130
|
async_effect(() => {
|
|
127
|
-
if (DEV)
|
|
131
|
+
if (DEV) {
|
|
132
|
+
reactivity_loss_tracker = {
|
|
133
|
+
effect: /** @type {Effect} */ (active_effect),
|
|
134
|
+
warned: false
|
|
135
|
+
};
|
|
136
|
+
}
|
|
128
137
|
|
|
129
138
|
var effect = /** @type {Effect} */ (active_effect);
|
|
130
139
|
|
|
@@ -142,7 +151,9 @@ export function async_derived(fn, label, location) {
|
|
|
142
151
|
unset_context();
|
|
143
152
|
}
|
|
144
153
|
|
|
145
|
-
if (DEV)
|
|
154
|
+
if (DEV) {
|
|
155
|
+
reactivity_loss_tracker = null;
|
|
156
|
+
}
|
|
146
157
|
|
|
147
158
|
var batch = /** @type {Batch} */ (current_batch);
|
|
148
159
|
|
|
@@ -174,7 +185,9 @@ export function async_derived(fn, label, location) {
|
|
|
174
185
|
* @param {unknown} error
|
|
175
186
|
*/
|
|
176
187
|
const handler = (value, error = undefined) => {
|
|
177
|
-
if (DEV)
|
|
188
|
+
if (DEV) {
|
|
189
|
+
reactivity_loss_tracker = null;
|
|
190
|
+
}
|
|
178
191
|
|
|
179
192
|
if (decrement_pending) {
|
|
180
193
|
// don't trigger an update if we're only here because
|
|
@@ -383,7 +396,7 @@ export function update_derived(derived) {
|
|
|
383
396
|
// change, `derived.equals` may incorrectly return `true`
|
|
384
397
|
if (!current_batch?.is_fork || derived.deps === null) {
|
|
385
398
|
derived.v = value;
|
|
386
|
-
current_batch?.capture(derived, old_value);
|
|
399
|
+
current_batch?.capture(derived, old_value, true);
|
|
387
400
|
|
|
388
401
|
// deriveds without dependencies should never be recomputed
|
|
389
402
|
if (derived.deps === null) {
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from './constants.js';
|
|
28
28
|
import { old_values } from './reactivity/sources.js';
|
|
29
29
|
import {
|
|
30
|
-
|
|
30
|
+
reactivity_loss_tracker,
|
|
31
31
|
execute_derived,
|
|
32
32
|
freeze_derived_effects,
|
|
33
33
|
recent_async_deriveds,
|
|
@@ -58,6 +58,7 @@ import { UNINITIALIZED } from '../../constants.js';
|
|
|
58
58
|
import { captured_signals } from './legacy.js';
|
|
59
59
|
import { without_reactive_context } from './dom/elements/bindings/shared.js';
|
|
60
60
|
import { set_signal_status, update_derived_status } from './reactivity/status.js';
|
|
61
|
+
import * as w from './warnings.js';
|
|
61
62
|
|
|
62
63
|
let is_updating_effect = false;
|
|
63
64
|
|
|
@@ -568,19 +569,20 @@ export function get(signal) {
|
|
|
568
569
|
}
|
|
569
570
|
|
|
570
571
|
if (DEV) {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
572
|
+
if (
|
|
573
|
+
!untracking &&
|
|
574
|
+
reactivity_loss_tracker &&
|
|
575
|
+
!reactivity_loss_tracker.warned &&
|
|
576
|
+
(reactivity_loss_tracker.effect.f & REACTION_IS_UPDATING) === 0
|
|
577
|
+
) {
|
|
578
|
+
reactivity_loss_tracker.warned = true;
|
|
575
579
|
|
|
576
|
-
|
|
577
|
-
// w.await_reactivity_loss(/** @type {string} */ (signal.label));
|
|
580
|
+
w.await_reactivity_loss(/** @type {string} */ (signal.label));
|
|
578
581
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
// }
|
|
582
|
+
var trace = get_error('traced at');
|
|
583
|
+
// eslint-disable-next-line no-console
|
|
584
|
+
if (trace) console.warn(trace);
|
|
585
|
+
}
|
|
584
586
|
|
|
585
587
|
recent_async_deriveds.delete(signal);
|
|
586
588
|
|
|
@@ -595,7 +597,7 @@ export function get(signal) {
|
|
|
595
597
|
if (signal.trace) {
|
|
596
598
|
signal.trace();
|
|
597
599
|
} else {
|
|
598
|
-
|
|
600
|
+
trace = get_error('traced at');
|
|
599
601
|
|
|
600
602
|
if (trace) {
|
|
601
603
|
var entry = tracing_expressions.entries.get(signal);
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1030,9 +1030,11 @@ declare module 'svelte/compiler' {
|
|
|
1030
1030
|
/**
|
|
1031
1031
|
* If `true`, tells the compiler to generate a custom element constructor instead of a regular Svelte component.
|
|
1032
1032
|
*
|
|
1033
|
+
* You can also pass a function that receives `{ filename }` and returns a boolean.
|
|
1034
|
+
*
|
|
1033
1035
|
* @default false
|
|
1034
1036
|
*/
|
|
1035
|
-
customElement?: boolean;
|
|
1037
|
+
customElement?: boolean | ((options: { filename: string }) => boolean);
|
|
1036
1038
|
/**
|
|
1037
1039
|
* If `true`, getters and setters will be created for the component's props. If `false`, they will only be created for readonly exported values (i.e. those declared with `const`, `class` and `function`). If compiling with `customElement: true` this option defaults to `true`.
|
|
1038
1040
|
*
|
|
@@ -1058,8 +1060,10 @@ declare module 'svelte/compiler' {
|
|
|
1058
1060
|
* - `'injected'`: styles will be included in the `head` when using `render(...)`, and injected into the document (if not already present) when the component mounts. For components compiled as custom elements, styles are injected to the shadow root.
|
|
1059
1061
|
* - `'external'`: the CSS will only be returned in the `css` field of the compilation result. Most Svelte bundler plugins will set this to `'external'` and use the CSS that is statically generated for better performance, as it will result in smaller JavaScript bundles and the output can be served as cacheable `.css` files.
|
|
1060
1062
|
* This is always `'injected'` when compiling with `customElement` mode.
|
|
1063
|
+
*
|
|
1064
|
+
* You can also pass a function that receives `{ filename }` and returns either `'injected'` or `'external'`.
|
|
1061
1065
|
*/
|
|
1062
|
-
css?: 'injected' | 'external';
|
|
1066
|
+
css?: 'injected' | 'external' | ((options: { filename: string }) => 'injected' | 'external');
|
|
1063
1067
|
/**
|
|
1064
1068
|
* A function that takes a `{ hash, css, name, filename }` argument and returns the string that is used as a classname for scoped CSS.
|
|
1065
1069
|
* It defaults to returning `svelte-${hash(filename ?? css)}`.
|
|
@@ -1099,7 +1103,7 @@ declare module 'svelte/compiler' {
|
|
|
1099
1103
|
* which is likely not what you want. If you're using Vite, consider using [dynamicCompileOptions](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#dynamiccompileoptions) instead.
|
|
1100
1104
|
* @default undefined
|
|
1101
1105
|
*/
|
|
1102
|
-
runes?: boolean | undefined;
|
|
1106
|
+
runes?: boolean | undefined | ((options: { filename: string }) => boolean | undefined);
|
|
1103
1107
|
/**
|
|
1104
1108
|
* If `true`, exposes the Svelte major version in the browser by adding it to a `Set` stored in the global `window.__svelte.v`.
|
|
1105
1109
|
*
|
|
@@ -3006,9 +3010,11 @@ declare module 'svelte/types/compiler/interfaces' {
|
|
|
3006
3010
|
/**
|
|
3007
3011
|
* If `true`, tells the compiler to generate a custom element constructor instead of a regular Svelte component.
|
|
3008
3012
|
*
|
|
3013
|
+
* You can also pass a function that receives `{ filename }` and returns a boolean.
|
|
3014
|
+
*
|
|
3009
3015
|
* @default false
|
|
3010
3016
|
*/
|
|
3011
|
-
customElement?: boolean;
|
|
3017
|
+
customElement?: boolean | ((options: { filename: string }) => boolean);
|
|
3012
3018
|
/**
|
|
3013
3019
|
* If `true`, getters and setters will be created for the component's props. If `false`, they will only be created for readonly exported values (i.e. those declared with `const`, `class` and `function`). If compiling with `customElement: true` this option defaults to `true`.
|
|
3014
3020
|
*
|
|
@@ -3034,8 +3040,10 @@ declare module 'svelte/types/compiler/interfaces' {
|
|
|
3034
3040
|
* - `'injected'`: styles will be included in the `head` when using `render(...)`, and injected into the document (if not already present) when the component mounts. For components compiled as custom elements, styles are injected to the shadow root.
|
|
3035
3041
|
* - `'external'`: the CSS will only be returned in the `css` field of the compilation result. Most Svelte bundler plugins will set this to `'external'` and use the CSS that is statically generated for better performance, as it will result in smaller JavaScript bundles and the output can be served as cacheable `.css` files.
|
|
3036
3042
|
* This is always `'injected'` when compiling with `customElement` mode.
|
|
3043
|
+
*
|
|
3044
|
+
* You can also pass a function that receives `{ filename }` and returns either `'injected'` or `'external'`.
|
|
3037
3045
|
*/
|
|
3038
|
-
css?: 'injected' | 'external';
|
|
3046
|
+
css?: 'injected' | 'external' | ((options: { filename: string }) => 'injected' | 'external');
|
|
3039
3047
|
/**
|
|
3040
3048
|
* A function that takes a `{ hash, css, name, filename }` argument and returns the string that is used as a classname for scoped CSS.
|
|
3041
3049
|
* It defaults to returning `svelte-${hash(filename ?? css)}`.
|
|
@@ -3075,7 +3083,7 @@ declare module 'svelte/types/compiler/interfaces' {
|
|
|
3075
3083
|
* which is likely not what you want. If you're using Vite, consider using [dynamicCompileOptions](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#dynamiccompileoptions) instead.
|
|
3076
3084
|
* @default undefined
|
|
3077
3085
|
*/
|
|
3078
|
-
runes?: boolean | undefined;
|
|
3086
|
+
runes?: boolean | undefined | ((options: { filename: string }) => boolean | undefined);
|
|
3079
3087
|
/**
|
|
3080
3088
|
* If `true`, exposes the Svelte major version in the browser by adding it to a `Set` stored in the global `window.__svelte.v`.
|
|
3081
3089
|
*
|
package/types/index.d.ts.map
CHANGED
|
@@ -275,6 +275,6 @@
|
|
|
275
275
|
null,
|
|
276
276
|
null
|
|
277
277
|
],
|
|
278
|
-
"mappings": ";;;;;;;;;kBAUiBA,2BAA2BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmC/BC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwEhBC,kBAAkBA;;;;;;;;;;;;;;;;;;;;;;;;kBAwBbC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoCbC,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;aAwBrBC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCfC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6BdC,aAAaA;;;;;;;;;;;;;;;;;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