diff --git a/packages/solid/src/render/component.ts b/packages/solid/src/render/component.ts index 1a00005a..d87a1315 100644 --- a/packages/solid/src/render/component.ts +++ b/packages/solid/src/render/component.ts @@ -377,11 +377,11 @@ export function lazy>( return createMemo(() => (Comp = comp()) ? untrack(() => { - if (IS_DEV) Object.assign(Comp!, { [$DEVCOMP]: true }); - if (!ctx || sharedConfig.done) return Comp!(props); + if (!ctx || sharedConfig.done) + return IS_DEV ? devComponent(Comp!, props) : Comp!(props); const c = sharedConfig.context; setHydrateContext(ctx); - const r = Comp!(props); + const r = IS_DEV ? devComponent(Comp!, props) : Comp!(props); setHydrateContext(c); return r; })