diff --git a/packages/svelte2tsx/src/svelte2tsx/nodes/ExportedNames.ts b/packages/svelte2tsx/src/svelte2tsx/nodes/ExportedNames.ts index 253c3c6f5..91ec37aba 100644 --- a/packages/svelte2tsx/src/svelte2tsx/nodes/ExportedNames.ts +++ b/packages/svelte2tsx/src/svelte2tsx/nodes/ExportedNames.ts @@ -709,7 +709,9 @@ export class ExportedNames { */ createExportsStr(): string { const names = Array.from(this.exports.entries()); - const others = names.filter(([, { isLet, isNamedExport }]) => !isLet || isNamedExport); + const others = names.filter( + ([, { isLet, isNamedExport }]) => !isLet || (this.usesRunes() && isNamedExport) + ); const needsAccessors = this.usesAccessors && names.length > 0 && !this.usesRunes(); // runes mode doesn't support accessors if (this.isSvelte5Plus) {