@vixt/core 0.6.5 → 0.6.6
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/node/index.mjs +20 -17
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -260,28 +260,31 @@ var app_default = defineVixtModule({
|
|
|
260
260
|
},
|
|
261
261
|
transformIndexHtml: {
|
|
262
262
|
order,
|
|
263
|
-
handler() {
|
|
263
|
+
handler(html = "") {
|
|
264
264
|
if (!transformIndexHtml) return;
|
|
265
265
|
const { rootTag, rootId, head } = options;
|
|
266
266
|
const tags = Object.entries(head ?? {}).map(([tag, attrs]) => attrs.map((attr) => resolveHead(tag, attr))).flat();
|
|
267
267
|
const loadingTemplate = resolveLoadingTemplate(options, vixt);
|
|
268
|
-
return
|
|
269
|
-
{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
tag: "script",
|
|
277
|
-
attrs: {
|
|
278
|
-
type: "module",
|
|
279
|
-
src: relativeEntryPath
|
|
268
|
+
return {
|
|
269
|
+
html: `<!DOCTYPE html>\n${html}`,
|
|
270
|
+
tags: [
|
|
271
|
+
{
|
|
272
|
+
tag: rootTag,
|
|
273
|
+
attrs: { id: rootId },
|
|
274
|
+
children: loadingTemplate,
|
|
275
|
+
injectTo: "body"
|
|
280
276
|
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
277
|
+
{
|
|
278
|
+
tag: "script",
|
|
279
|
+
attrs: {
|
|
280
|
+
type: "module",
|
|
281
|
+
src: relativeEntryPath
|
|
282
|
+
},
|
|
283
|
+
injectTo: "body"
|
|
284
|
+
},
|
|
285
|
+
...tags
|
|
286
|
+
]
|
|
287
|
+
};
|
|
285
288
|
}
|
|
286
289
|
}
|
|
287
290
|
};
|