Comparing version 0.7.4 to 0.7.5
@@ -94,3 +94,3 @@ import { OnCreateAppSync, OnCreateAppAsync, OnAfterRenderHtmlSync, OnAfterRenderHtmlAsync, OnBeforeRenderClientSync, OnBeforeRenderClientAsync, BodyInjectHtml } from './hooks/types'; | ||
}; | ||
bodyHtmlStart: { | ||
bodyHtmlBegin: { | ||
env: { | ||
@@ -157,3 +157,3 @@ server: true; | ||
*/ | ||
bodyHtmlStart?: BodyInjectHtml; | ||
bodyHtmlBegin?: BodyInjectHtml; | ||
/** | ||
@@ -160,0 +160,0 @@ * The result of this is injected at the end of `<body>` |
@@ -85,3 +85,3 @@ const toggleSsrRelatedConfig = ({ configDefinedAt, configValue }) => { | ||
}, | ||
bodyHtmlStart: { | ||
bodyHtmlBegin: { | ||
env: { server: true, client: true }, | ||
@@ -88,0 +88,0 @@ cumulative: true |
@@ -26,3 +26,3 @@ import { c as createVueApp, o as objectAssign, a as callCumulativeHooks, g as getHeadSetting } from "../getHeadSetting-Bd9Y_bSc.js"; | ||
setFavicon(favicon); | ||
replaceAdjacentBodyHtml(pageContext, "bodyHtmlStart"); | ||
replaceAdjacentBodyHtml(pageContext, "bodyHtmlBegin"); | ||
replaceAdjacentBodyHtml(pageContext, "bodyHtmlEnd"); | ||
@@ -50,3 +50,3 @@ } | ||
const hookHtml = (await callCumulativeHooks(hooks, pageContext)).join(""); | ||
const startComment = `<!-- vike-vue:${method} begin -->`; | ||
const startComment = `<!-- vike-vue:${method} start -->`; | ||
const endComment = `<!-- vike-vue:${method} finish -->`; | ||
@@ -53,0 +53,0 @@ const startIndex = document.body.innerHTML.indexOf(startComment) + startComment.length; |
@@ -28,4 +28,4 @@ import { renderToString, renderToNodeStream } from "vue/server-renderer"; | ||
} | ||
const bodyHtmlStart = dangerouslySkipEscape( | ||
(await callCumulativeHooks(pageContext.config.bodyHtmlStart, pageContext)).join("") | ||
const bodyHtmlBegin = dangerouslySkipEscape( | ||
(await callCumulativeHooks(pageContext.config.bodyHtmlBegin, pageContext)).join("") | ||
); | ||
@@ -44,7 +44,7 @@ const defaultTeleport = `<div id="teleported">${((_a = ssrContext.teleports) == null ? void 0 : _a["#teleported"]) ?? ""}</div>`; | ||
<body> | ||
<!-- vike-vue:bodyHtmlStart begin --> | ||
${bodyHtmlStart} | ||
<!-- vike-vue:bodyHtmlStart finish --> | ||
<!-- vike-vue:bodyHtmlBegin start --> | ||
${bodyHtmlBegin} | ||
<!-- vike-vue:bodyHtmlBegin finish --> | ||
<div id="app">${pageView}</div> | ||
<!-- vike-vue:bodyHtmlEnd begin --> | ||
<!-- vike-vue:bodyHtmlEnd start --> | ||
${bodyHtmlEnd} | ||
@@ -51,0 +51,0 @@ <!-- vike-vue:bodyHtmlEnd finish --> |
@@ -18,3 +18,3 @@ import { App } from 'vue'; | ||
onBeforeRenderClient?: Array<OnBeforeRenderClientSync | OnBeforeRenderClientAsync>; | ||
bodyHtmlStart?: BodyInjectHtml[]; | ||
bodyHtmlBegin?: BodyInjectHtml[]; | ||
bodyHtmlEnd?: BodyInjectHtml[]; | ||
@@ -21,0 +21,0 @@ Layout?: Component[]; |
{ | ||
"name": "vike-vue", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -69,3 +69,3 @@ <!-- WARNING: keep links absolute in this file so they work on NPM too --> | ||
* `onBeforeRenderClient()`: Called before mounting the app on the client. Usually used for hydration of state management libraries. | ||
* `bodyHtmlStart()`: Called on the server and client. Allows you to add content at the start of the `<body>` tag. | ||
* `bodyHtmlBegin()`: Called on the server and client. Allows you to add content at the start of the `<body>` tag. | ||
* `bodyHtmlEnd()`: Called on the server and client. Defaults to `<div id="teleported"></div>`. Allows you to add content at the end of the `<body>` tag. | ||
@@ -72,0 +72,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet