full site update
This commit is contained in:
16
node_modules/astro/dist/runtime/server/render/common.js
generated
vendored
16
node_modules/astro/dist/runtime/server/render/common.js
generated
vendored
@@ -6,6 +6,7 @@ import {
|
||||
} from "../scripts.js";
|
||||
import { renderAllHeadContent } from "./head.js";
|
||||
import { isRenderInstruction } from "./instruction.js";
|
||||
import { renderServerIslandRuntime } from "./server-islands.js";
|
||||
import { isSlotString } from "./slot.js";
|
||||
const Fragment = Symbol.for("astro:fragment");
|
||||
const Renderer = Symbol.for("astro:renderer");
|
||||
@@ -19,9 +20,11 @@ function stringifyChunk(result, chunk) {
|
||||
const { hydration } = instruction;
|
||||
let needsHydrationScript = hydration && determineIfNeedsHydrationScript(result);
|
||||
let needsDirectiveScript = hydration && determinesIfNeedsDirectiveScript(result, hydration.directive);
|
||||
let prescriptType = needsHydrationScript ? "both" : needsDirectiveScript ? "directive" : null;
|
||||
if (prescriptType) {
|
||||
let prescripts = getPrescripts(result, prescriptType, hydration.directive);
|
||||
if (needsHydrationScript) {
|
||||
let prescripts = getPrescripts(result, "both", hydration.directive);
|
||||
return markHTMLString(prescripts);
|
||||
} else if (needsDirectiveScript) {
|
||||
let prescripts = getPrescripts(result, "directive", hydration.directive);
|
||||
return markHTMLString(prescripts);
|
||||
} else {
|
||||
return "";
|
||||
@@ -48,6 +51,13 @@ function stringifyChunk(result, chunk) {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
case "server-island-runtime": {
|
||||
if (result._metadata.hasRenderedServerIslandRuntime) {
|
||||
return "";
|
||||
}
|
||||
result._metadata.hasRenderedServerIslandRuntime = true;
|
||||
return renderServerIslandRuntime();
|
||||
}
|
||||
default: {
|
||||
throw new Error(`Unknown chunk type: ${chunk.type}`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user