@zenithbuild/core 1.2.4 → 1.2.8
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/cli/commands/dev.ts +5 -3
- package/package.json +2 -2
package/cli/commands/dev.ts
CHANGED
|
@@ -256,9 +256,11 @@ export async function dev(options: DevOptions = {}): Promise<void> {
|
|
|
256
256
|
const scriptTag = `<script type="module">\n${page.script}\n</script>`
|
|
257
257
|
const allScripts = `${runtimeTag}\n${scriptTag}`
|
|
258
258
|
|
|
259
|
-
let html = page.html.includes('</
|
|
260
|
-
? page.html.replace('</
|
|
261
|
-
:
|
|
259
|
+
let html = page.html.includes('</head>')
|
|
260
|
+
? page.html.replace('</head>', `${allScripts}\n</head>`)
|
|
261
|
+
: page.html.includes('</body>')
|
|
262
|
+
? page.html.replace('</body>', `${allScripts}\n</body>`)
|
|
263
|
+
: `${page.html}\n${allScripts}`
|
|
262
264
|
|
|
263
265
|
// Ensure DOCTYPE is present to prevent Quirks Mode (critical for SVG namespace)
|
|
264
266
|
if (!html.trimStart().toLowerCase().startsWith('<!doctype')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenithbuild/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Core library for the Zenith framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
"@zenithbuild/router": "latest",
|
|
69
69
|
"picocolors": "^1.1.1"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|