@rangojs/router 0.0.0-experimental.68 → 0.0.0-experimental.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vite/index.js
CHANGED
|
@@ -1311,7 +1311,7 @@ ${lazyImports.join(",\n")}
|
|
|
1311
1311
|
);
|
|
1312
1312
|
if (wholeFile) return wholeFile;
|
|
1313
1313
|
}
|
|
1314
|
-
if (!isRscEnv) {
|
|
1314
|
+
if (!isRscEnv && (hasPrerenderHandlerCode || hasStaticHandlerCode)) {
|
|
1315
1315
|
const allBindings = [];
|
|
1316
1316
|
if (hasLoaderCode) {
|
|
1317
1317
|
allBindings.push(...getBindings(code, getFnNames("createLoader")));
|
|
@@ -1784,7 +1784,7 @@ import { resolve } from "node:path";
|
|
|
1784
1784
|
// package.json
|
|
1785
1785
|
var package_default = {
|
|
1786
1786
|
name: "@rangojs/router",
|
|
1787
|
-
version: "0.0.0-experimental.
|
|
1787
|
+
version: "0.0.0-experimental.69",
|
|
1788
1788
|
description: "Django-inspired RSC router with composable URL patterns",
|
|
1789
1789
|
keywords: [
|
|
1790
1790
|
"react",
|
package/package.json
CHANGED
|
@@ -482,7 +482,11 @@ ${lazyImports.join(",\n")}
|
|
|
482
482
|
// Gather ALL recognized bindings and check if they cover every export.
|
|
483
483
|
// If yes, replace the entire file with stubs — this strips server-only
|
|
484
484
|
// imports (node:fs, DB clients, etc.) that would crash in the browser.
|
|
485
|
-
|
|
485
|
+
//
|
|
486
|
+
// Only applies when the file contains Prerender/Static (the handler
|
|
487
|
+
// types that bring server-only code). Files with only loaders, handles,
|
|
488
|
+
// or locationState are handled correctly by the unified pipeline below.
|
|
489
|
+
if (!isRscEnv && (hasPrerenderHandlerCode || hasStaticHandlerCode)) {
|
|
486
490
|
const allBindings: CreateExportBinding[] = [];
|
|
487
491
|
if (hasLoaderCode) {
|
|
488
492
|
allBindings.push(...getBindings(code, getFnNames("createLoader")));
|