Skip to content

Commit 04f9cd7

Browse files
committed
fix(vite): load the Vite plugin under Node type stripping
The Analog example's vite.config.ts imports the plugin from source, and Node loads it with type stripping only, which rejects the constructor parameter property in ModuleTimings. It is now a plain field set in the constructor.
1 parent 6815e76 commit 04f9cd7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/devtools/src/vite-timings.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ export class ModuleTimings {
3737
/** Whether a module was dropped to stay under the cap. */
3838
capped = false;
3939

40-
constructor(readonly max = MAX_TIMED_MODULES) {}
40+
readonly max: number;
41+
42+
// No parameter property: Node loads vite.config.ts with type stripping only.
43+
constructor(max = MAX_TIMED_MODULES) {
44+
this.max = max;
45+
}
4146

4247
get size(): number {
4348
return this.byId.size;

0 commit comments

Comments
 (0)