+25
-13
@@ -1301,2 +1301,3 @@ 'use strict'; | ||
| p.then(mod => { | ||
| p.mod = mod; | ||
| p.v = mod.default; | ||
@@ -1344,2 +1345,3 @@ }, err => { | ||
| return assets.then(resolved => { | ||
| cache.set(id, resolved ?? null); | ||
| const current = ctx._currentBoundaryId; | ||
@@ -1353,2 +1355,3 @@ ctx._currentBoundaryId = boundary; | ||
| }, err => { | ||
| cache.set(id, null); | ||
| console.warn(`lazy() asset resolution failed for "${id}":`, err); | ||
@@ -1362,17 +1365,26 @@ }); | ||
| } else if (!noHydrate) { | ||
| const boundary = ctx._currentBoundaryId; | ||
| assetsPending = p.then(mod => { | ||
| const id = mod?.$$moduleUrl; | ||
| if (typeof id !== "string") { | ||
| if (p.mod !== undefined) { | ||
| const id = p.mod?.$$moduleUrl; | ||
| if (typeof id === "string") { | ||
| assetsPending = registerLazyAssets(id); | ||
| } else { | ||
| console.warn("lazy() used in SSR without a moduleUrl and the loaded module has no " + "$$moduleUrl export, so its client assets cannot be resolved — the " + "component will load late during hydration. This is typically " + "injected by the bundler plugin."); | ||
| return; | ||
| } | ||
| const current = ctx._currentBoundaryId; | ||
| ctx._currentBoundaryId = boundary; | ||
| try { | ||
| return registerLazyAssets(id); | ||
| } finally { | ||
| ctx._currentBoundaryId = current; | ||
| } | ||
| }); | ||
| } else { | ||
| const boundary = ctx._currentBoundaryId; | ||
| assetsPending = p.then(mod => { | ||
| const id = mod?.$$moduleUrl; | ||
| if (typeof id !== "string") { | ||
| console.warn("lazy() used in SSR without a moduleUrl and the loaded module has no " + "$$moduleUrl export, so its client assets cannot be resolved — the " + "component will load late during hydration. This is typically " + "injected by the bundler plugin."); | ||
| return; | ||
| } | ||
| const current = ctx._currentBoundaryId; | ||
| ctx._currentBoundaryId = boundary; | ||
| try { | ||
| return registerLazyAssets(id); | ||
| } finally { | ||
| ctx._currentBoundaryId = current; | ||
| } | ||
| }); | ||
| } | ||
| } | ||
@@ -1379,0 +1391,0 @@ if (assetsPending) { |
+25
-13
@@ -1300,2 +1300,3 @@ import { NotReadyError, $REFRESH, merge as merge$1, isWrappable, NoOwnerError, ContextNotFoundError, $PROXY, flatten } from '@solidjs/signals'; | ||
| p.then(mod => { | ||
| p.mod = mod; | ||
| p.v = mod.default; | ||
@@ -1343,2 +1344,3 @@ }, err => { | ||
| return assets.then(resolved => { | ||
| cache.set(id, resolved ?? null); | ||
| const current = ctx._currentBoundaryId; | ||
@@ -1352,2 +1354,3 @@ ctx._currentBoundaryId = boundary; | ||
| }, err => { | ||
| cache.set(id, null); | ||
| console.warn(`lazy() asset resolution failed for "${id}":`, err); | ||
@@ -1361,17 +1364,26 @@ }); | ||
| } else if (!noHydrate) { | ||
| const boundary = ctx._currentBoundaryId; | ||
| assetsPending = p.then(mod => { | ||
| const id = mod?.$$moduleUrl; | ||
| if (typeof id !== "string") { | ||
| if (p.mod !== undefined) { | ||
| const id = p.mod?.$$moduleUrl; | ||
| if (typeof id === "string") { | ||
| assetsPending = registerLazyAssets(id); | ||
| } else { | ||
| console.warn("lazy() used in SSR without a moduleUrl and the loaded module has no " + "$$moduleUrl export, so its client assets cannot be resolved — the " + "component will load late during hydration. This is typically " + "injected by the bundler plugin."); | ||
| return; | ||
| } | ||
| const current = ctx._currentBoundaryId; | ||
| ctx._currentBoundaryId = boundary; | ||
| try { | ||
| return registerLazyAssets(id); | ||
| } finally { | ||
| ctx._currentBoundaryId = current; | ||
| } | ||
| }); | ||
| } else { | ||
| const boundary = ctx._currentBoundaryId; | ||
| assetsPending = p.then(mod => { | ||
| const id = mod?.$$moduleUrl; | ||
| if (typeof id !== "string") { | ||
| console.warn("lazy() used in SSR without a moduleUrl and the loaded module has no " + "$$moduleUrl export, so its client assets cannot be resolved — the " + "component will load late during hydration. This is typically " + "injected by the bundler plugin."); | ||
| return; | ||
| } | ||
| const current = ctx._currentBoundaryId; | ||
| ctx._currentBoundaryId = boundary; | ||
| try { | ||
| return registerLazyAssets(id); | ||
| } finally { | ||
| ctx._currentBoundaryId = current; | ||
| } | ||
| }); | ||
| } | ||
| } | ||
@@ -1378,0 +1390,0 @@ if (assetsPending) { |
+2
-2
| { | ||
| "name": "solid-js", | ||
| "description": "Reactive JavaScript library for building user interfaces. Compiles JSX to real DOM with fine-grained signal-based updates — no virtual DOM.", | ||
| "version": "2.0.0-beta.33", | ||
| "version": "2.0.0-beta.34", | ||
| "author": "Ryan Carniato", | ||
@@ -131,3 +131,3 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@solidjs/signals": "^2.0.0-beta.33", | ||
| "@solidjs/signals": "^2.0.0-beta.34", | ||
| "csstype": "^3.1.0", | ||
@@ -134,0 +134,0 @@ "seroval": "~1.5.4", |
514549
0.24%11489
0.21%