vatts 1.0.2-alpha.5 → 1.0.2
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/renderer.js +9 -1
- package/package.json +1 -1
package/dist/renderer.js
CHANGED
|
@@ -161,7 +161,15 @@ function getJavaScriptUrls(req) {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
function ServerRoot({ lang, title, metaTagsHtml, initialDataScript, hotReloadScript, dataScript, children }) {
|
|
164
|
-
return ((0, jsx_runtime_1.jsxs)("html", { lang: lang, children: [(0, jsx_runtime_1.jsxs)("head", { children: [(0, jsx_runtime_1.jsx)("
|
|
164
|
+
return ((0, jsx_runtime_1.jsxs)("html", { lang: lang, children: [(0, jsx_runtime_1.jsxs)("head", { children: [(0, jsx_runtime_1.jsx)("meta", { charSet: "utf-8" }), (0, jsx_runtime_1.jsx)("title", { children: title }), initialDataScript && ((0, jsx_runtime_1.jsx)("script", { dangerouslySetInnerHTML: { __html: initialDataScript } })), metaTagsHtml && ((0, jsx_runtime_1.jsx)("script", { dangerouslySetInnerHTML: {
|
|
165
|
+
__html: `
|
|
166
|
+
(() => {
|
|
167
|
+
const tpl = document.createElement('template');
|
|
168
|
+
tpl.innerHTML = ${JSON.stringify(metaTagsHtml)};
|
|
169
|
+
document.head.append(...tpl.content.childNodes);
|
|
170
|
+
})();
|
|
171
|
+
`
|
|
172
|
+
} }))] }), (0, jsx_runtime_1.jsxs)("body", { children: [dataScript, (0, jsx_runtime_1.jsx)("div", { id: "root", children: children }), hotReloadScript && (0, jsx_runtime_1.jsx)("span", { dangerouslySetInnerHTML: { __html: hotReloadScript } })] })] }));
|
|
165
173
|
}
|
|
166
174
|
async function renderAsStream({ req, res, route, params, allRoutes }) {
|
|
167
175
|
const { generateMetadata } = route;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vatts",
|
|
3
|
-
"version": "1.0.2
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Vatts.js is a high-level framework for building web applications with ease and speed. It provides a robust set of tools and features to streamline development and enhance productivity.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"author": "itsmuzin",
|