Skip to content

Commit 6b71441

Browse files
committed
fix: playground warnings
1 parent 125156d commit 6b71441

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sites/svelte-5-preview/src/lib/workers/compiler/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function compile({ id, source, options, return_ast }) {
7676
js: js.code,
7777
css: css?.code || `/* Add a <sty` + `le> tag to see compiled CSS */`,
7878
error: null,
79-
warnings,
79+
warnings: warnings.map((warning) => warning.toJSON()),
8080
metadata,
8181
ast
8282
}
@@ -95,7 +95,7 @@ function compile({ id, source, options, return_ast }) {
9595
js: compiled.js.code,
9696
css,
9797
error: null,
98-
warnings: compiled.warnings,
98+
warnings: compiled.warnings.map((warning) => warning.toJSON()),
9999
metadata: compiled.metadata
100100
}
101101
};

sites/svelte-5-preview/src/lib/workers/workers.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ export type CompileMessageData = {
1212
js: string;
1313
css: string;
1414
ast?: import('svelte/types/compiler/interfaces').Ast;
15-
};
16-
metadata?: {
17-
runes: boolean;
15+
metadata?: {
16+
runes: boolean;
17+
};
1818
};
1919
};
2020

0 commit comments

Comments
 (0)