@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.
Files changed (2) hide show
  1. package/dist/node/index.mjs +20 -17
  2. package/package.json +1 -1
@@ -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
- tag: rootTag,
271
- attrs: { id: rootId },
272
- children: loadingTemplate,
273
- injectTo: "body"
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
- injectTo: "body"
282
- },
283
- ...tags
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
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vixt/core",
3
3
  "type": "module",
4
- "version": "0.6.5",
4
+ "version": "0.6.6",
5
5
  "author": "SoulLyoko<https://github.com/SoulLyoko>",
6
6
  "license": "MIT",
7
7
  "homepage": "https://soullyoko.github.io/vixt/",