vatts 1.0.2-alpha.5 → 1.0.3
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 +8 -1
- package/package.json +1 -1
package/dist/renderer.js
CHANGED
|
@@ -161,7 +161,14 @@ function getJavaScriptUrls(req) {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
function ServerRoot({ lang, title, metaTagsHtml, initialDataScript, hotReloadScript, dataScript, children }) {
|
|
164
|
-
|
|
164
|
+
// Concatena tudo que vai no head em uma única string
|
|
165
|
+
const headContent = `
|
|
166
|
+
<meta charset="utf-8" />
|
|
167
|
+
<title>${title}</title>
|
|
168
|
+
${initialDataScript ? `<script>${initialDataScript}</script>` : ''}
|
|
169
|
+
${metaTagsHtml || ''}
|
|
170
|
+
`;
|
|
171
|
+
return ((0, jsx_runtime_1.jsxs)("html", { lang: lang, children: [(0, jsx_runtime_1.jsx)("head", { dangerouslySetInnerHTML: { __html: headContent } }), (0, jsx_runtime_1.jsxs)("body", { children: [dataScript, (0, jsx_runtime_1.jsx)("div", { id: "root", children: children }), hotReloadScript && ((0, jsx_runtime_1.jsx)("div", { style: { display: 'none' }, dangerouslySetInnerHTML: { __html: hotReloadScript } }))] })] }));
|
|
165
172
|
}
|
|
166
173
|
async function renderAsStream({ req, res, route, params, allRoutes }) {
|
|
167
174
|
const { generateMetadata } = route;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vatts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
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",
|