@wuchale/svelte 0.16.2 → 0.16.4
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/dist/transformer.js +2 -2
- package/package.json +1 -1
package/dist/transformer.js
CHANGED
|
@@ -26,7 +26,7 @@ export class SvelteTransformer extends Transformer {
|
|
|
26
26
|
return msgs;
|
|
27
27
|
}
|
|
28
28
|
const needsWrapping = msgs.some(msg => {
|
|
29
|
-
if (['$props', '$derived', '$derived.by'].includes(msg.details.topLevelCall)) {
|
|
29
|
+
if (['$props', '$state', '$derived', '$derived.by'].includes(msg.details.topLevelCall)) {
|
|
30
30
|
return false;
|
|
31
31
|
}
|
|
32
32
|
if (msg.details.declaring !== 'variable') {
|
|
@@ -299,7 +299,7 @@ export class SvelteTransformer extends Transformer {
|
|
|
299
299
|
this.moduleExportRanges.push([declaration.start, declaration.end]);
|
|
300
300
|
continue;
|
|
301
301
|
}
|
|
302
|
-
for (const decl of declaration
|
|
302
|
+
for (const decl of declaration?.declarations ?? []) {
|
|
303
303
|
if (!decl.init) {
|
|
304
304
|
continue;
|
|
305
305
|
}
|