vike-lite 1.0.12 → 1.0.13
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/server.mjs +5 -1
- package/package.json +1 -1
package/dist/server.mjs
CHANGED
|
@@ -13,7 +13,6 @@ var AbortRender = class extends Error {
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/server/renderPage.tsx
|
|
15
15
|
const isProd = process.env.NODE_ENV === "production";
|
|
16
|
-
const virtualEntryClientId = "virtual:entry-client";
|
|
17
16
|
const ESCAPE_LOOKUP = {
|
|
18
17
|
"&": String.raw`\u0026`,
|
|
19
18
|
">": String.raw`\u003e`,
|
|
@@ -34,6 +33,10 @@ function getAssets(pageModuleId) {
|
|
|
34
33
|
const cssFiles = /* @__PURE__ */ new Set();
|
|
35
34
|
const jsFiles = /* @__PURE__ */ new Set();
|
|
36
35
|
const manifest = store.manifest;
|
|
36
|
+
function getVirtualEntryClientIdFromManifest() {
|
|
37
|
+
for (const key in manifest) if (manifest[key].isEntry) return key;
|
|
38
|
+
throw new Error("virtual:entry-client not found in manifest");
|
|
39
|
+
}
|
|
37
40
|
function collectAssets(key) {
|
|
38
41
|
const chunk = manifest[key];
|
|
39
42
|
if (!chunk) throw new Error(`Asset not found in manifest for key: ${key}`);
|
|
@@ -41,6 +44,7 @@ function getAssets(pageModuleId) {
|
|
|
41
44
|
if (chunk.css) for (const css of chunk.css) cssFiles.add(css);
|
|
42
45
|
if (chunk.imports) for (const imp of chunk.imports) collectAssets(imp);
|
|
43
46
|
}
|
|
47
|
+
const virtualEntryClientId = getVirtualEntryClientIdFromManifest();
|
|
44
48
|
collectAssets(virtualEntryClientId);
|
|
45
49
|
collectAssets(pageModuleId.replace("@/", ""));
|
|
46
50
|
return {
|