Skip to content

Commit

Permalink
chore: only emit named exports in runes mode
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloricciuti committed Oct 9, 2024
1 parent 896a7aa commit 267ca97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/svelte2tsx/src/svelte2tsx/nodes/ExportedNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 267ca97

Please sign in to comment.