@farm.js/core 0.1.0-beta.23 → 0.1.0-beta.24
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/{app-DA6ospIq.d.mts → app-DrFCUMHY.d.mts} +1 -0
- package/dist/{app-CTFnOJaI.d.ts → app-pwvKG2B1.d.ts} +1 -0
- package/dist/{chunk-TX54PXAJ.mjs → chunk-HVJHNKSP.mjs} +141 -40
- package/dist/chunk-HVJHNKSP.mjs.map +1 -0
- package/dist/{chunk-FJGTYLCO.mjs → chunk-HXE4VGH2.mjs} +14 -2
- package/dist/chunk-HXE4VGH2.mjs.map +1 -0
- package/dist/{chunk-5NOVWCFL.mjs → chunk-WO466YX5.mjs} +2 -2
- package/dist/{chunk-5NOVWCFL.mjs.map → chunk-WO466YX5.mjs.map} +1 -1
- package/dist/index.cjs +480 -360
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/internal/build-runtime.cjs +384 -264
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.mjs +3 -3
- package/dist/plugin.cjs +242 -141
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.mjs +2 -2
- package/dist/server.cjs +250 -149
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +2 -2
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +244 -143
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-FJGTYLCO.mjs.map +0 -1
- package/dist/chunk-TX54PXAJ.mjs.map +0 -1
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
mergeFarmFontCss,
|
|
35
35
|
mergeFarmViteConfig,
|
|
36
36
|
resolveRouteRenderingConfigFromFile
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-HVJHNKSP.mjs";
|
|
38
38
|
import {
|
|
39
39
|
farmEnvironmentFunctionsPlugin
|
|
40
40
|
} from "./chunk-V6WE6JSZ.mjs";
|
|
@@ -1257,6 +1257,11 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
1257
1257
|
const applicableClientLayouts = clientLayouts.filter(
|
|
1258
1258
|
(layout) => layout.shouldHydrate && layoutAppliesToRoute(layout.pattern, route.pattern)
|
|
1259
1259
|
);
|
|
1260
|
+
if (metadata.suppressedAsyncHydration) {
|
|
1261
|
+
logger.warn(
|
|
1262
|
+
`\u26A0\uFE0F ${route.pattern} is an async server component that imports client components; React cannot hydrate async components, so the route stays server-rendered and its client imports are not interactive.`
|
|
1263
|
+
);
|
|
1264
|
+
}
|
|
1260
1265
|
if (metadata.shouldHydrate || applicableClientLayouts.length > 0) {
|
|
1261
1266
|
const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
|
|
1262
1267
|
const hydrationStrategies = [
|
|
@@ -2134,6 +2139,13 @@ async function createMatchedHydrationElement(matched, pathname, searchParams) {
|
|
|
2134
2139
|
if (matched.route.pageShouldHydrate) {
|
|
2135
2140
|
const Component = await loadRouteComponent(matched.route);
|
|
2136
2141
|
if (!Component) return null;
|
|
2142
|
+
if (typeof Component === "function" && Component.constructor && Component.constructor.name === "AsyncFunction") {
|
|
2143
|
+
console.warn(
|
|
2144
|
+
"[Farm.js] Skipping hydration for " + pathname +
|
|
2145
|
+
": async server components cannot run in the browser. Server-rendered HTML is preserved."
|
|
2146
|
+
);
|
|
2147
|
+
return null;
|
|
2148
|
+
}
|
|
2137
2149
|
const props = { params: params, searchParams: Promise.resolve(searchParams) };
|
|
2138
2150
|
pageElement = React.createElement(Component, props);
|
|
2139
2151
|
} else if (hydrateLayouts) {
|
|
@@ -7039,4 +7051,4 @@ __name(buildNitro, "buildNitro");
|
|
|
7039
7051
|
export {
|
|
7040
7052
|
build
|
|
7041
7053
|
};
|
|
7042
|
-
//# sourceMappingURL=chunk-
|
|
7054
|
+
//# sourceMappingURL=chunk-HXE4VGH2.mjs.map
|