nuxt-nightly 4.2.0-29331207.25e91a2b → 4.2.0-29331210.766a637b
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.
|
@@ -10,7 +10,7 @@ import { getQuery as getURLQuery, joinURL } from "ufo";
|
|
|
10
10
|
import { propsToString, renderSSRHead } from "@unhead/vue/server";
|
|
11
11
|
import destr from "destr";
|
|
12
12
|
import { defineRenderHandler, getRouteRules, useNitroApp } from "nitropack/runtime";
|
|
13
|
-
import {
|
|
13
|
+
import { getRenderer } from "../utils/renderer/build-files.js";
|
|
14
14
|
import { payloadCache } from "../utils/cache.js";
|
|
15
15
|
import { renderPayloadJsonScript, renderPayloadResponse, renderPayloadScript, splitPayload } from "../utils/renderer/payload.js";
|
|
16
16
|
import { createSSRContext, setSSRError } from "../utils/renderer/app.js";
|
|
@@ -18,6 +18,7 @@ import { renderInlineStyles } from "../utils/renderer/inline-styles.js";
|
|
|
18
18
|
import { replaceIslandTeleports } from "../utils/renderer/islands.js";
|
|
19
19
|
import { renderSSRHeadOptions } from "#internal/unhead.config.mjs";
|
|
20
20
|
import { appHead, appTeleportAttrs, appTeleportTag, componentIslands, appManifest as isAppManifestEnabled } from "#internal/nuxt.config.mjs";
|
|
21
|
+
import entryIds from "#internal/nuxt/entry-ids.mjs";
|
|
21
22
|
import { entryFileName } from "#internal/entry-chunk.mjs";
|
|
22
23
|
import { buildAssetsURL, publicAssetsURL } from "#internal/nuxt/paths";
|
|
23
24
|
import { relative } from "pathe";
|
|
@@ -77,7 +78,7 @@ export default defineRenderHandler(async (event) => {
|
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
if (process.env.NUXT_INLINE_STYLES) {
|
|
80
|
-
for (const id of
|
|
81
|
+
for (const id of entryIds) {
|
|
81
82
|
ssrContext.modules.add(id);
|
|
82
83
|
}
|
|
83
84
|
}
|
|
@@ -10,21 +10,19 @@ const APP_ROOT_OPEN_TAG = `<${appRootTag}${propsToString(appRootAttrs)}>`;
|
|
|
10
10
|
const APP_ROOT_CLOSE_TAG = `</${appRootTag}>`;
|
|
11
11
|
const getServerEntry = () => import("#build/dist/server/server.mjs").then((r) => r.default || r);
|
|
12
12
|
const getClientManifest = () => import("#build/dist/server/client.manifest.mjs").then((r) => r.default || r).then((r) => typeof r === "function" ? r() : r);
|
|
13
|
+
const getPrecomputedDependencies = () => import("#build/dist/server/client.precomputed.mjs").then((r) => r.default || r).then((r) => typeof r === "function" ? r() : r);
|
|
13
14
|
export const getSSRRenderer = lazyCachedFunction(async () => {
|
|
14
|
-
const manifest = await getClientManifest();
|
|
15
|
-
if (!manifest) {
|
|
16
|
-
throw new Error("client.manifest is not available");
|
|
17
|
-
}
|
|
18
15
|
const createSSRApp = await getServerEntry();
|
|
19
16
|
if (!createSSRApp) {
|
|
20
17
|
throw new Error("Server bundle is not available");
|
|
21
18
|
}
|
|
22
|
-
const
|
|
23
|
-
|
|
19
|
+
const precomputed = import.meta.dev ? void 0 : await getPrecomputedDependencies();
|
|
20
|
+
const renderer = createRenderer(createSSRApp, {
|
|
21
|
+
precomputed,
|
|
22
|
+
manifest: import.meta.dev ? await getClientManifest() : void 0,
|
|
24
23
|
renderToString,
|
|
25
24
|
buildAssetsURL
|
|
26
|
-
};
|
|
27
|
-
const renderer = createRenderer(createSSRApp, options);
|
|
25
|
+
});
|
|
28
26
|
async function renderToString(input, context) {
|
|
29
27
|
const html = await _renderToString(input, context);
|
|
30
28
|
if (import.meta.dev && process.env.NUXT_VITE_NODE_OPTIONS) {
|
|
@@ -35,7 +33,7 @@ export const getSSRRenderer = lazyCachedFunction(async () => {
|
|
|
35
33
|
return renderer;
|
|
36
34
|
});
|
|
37
35
|
const getSPARenderer = lazyCachedFunction(async () => {
|
|
38
|
-
const
|
|
36
|
+
const precomputed = import.meta.dev ? void 0 : await getPrecomputedDependencies();
|
|
39
37
|
const spaTemplate = await import("#spa-template").then((r) => r.template).catch(() => "").then((r) => {
|
|
40
38
|
if (spaLoadingTemplateOutside) {
|
|
41
39
|
const APP_SPA_LOADER_OPEN_TAG = `<${appSpaLoaderTag}${propsToString(appSpaLoaderAttrs)}>`;
|
|
@@ -47,13 +45,13 @@ const getSPARenderer = lazyCachedFunction(async () => {
|
|
|
47
45
|
return APP_ROOT_OPEN_TAG + r + APP_ROOT_CLOSE_TAG;
|
|
48
46
|
}
|
|
49
47
|
});
|
|
50
|
-
const
|
|
51
|
-
|
|
48
|
+
const renderer = createRenderer(() => () => {
|
|
49
|
+
}, {
|
|
50
|
+
precomputed,
|
|
51
|
+
manifest: import.meta.dev ? await getClientManifest() : void 0,
|
|
52
52
|
renderToString: () => spaTemplate,
|
|
53
53
|
buildAssetsURL
|
|
54
|
-
};
|
|
55
|
-
const renderer = createRenderer(() => () => {
|
|
56
|
-
}, options);
|
|
54
|
+
});
|
|
57
55
|
const result = await renderer.renderToString({});
|
|
58
56
|
const renderToString = (ssrContext) => {
|
|
59
57
|
const config = useRuntimeConfig(ssrContext.event);
|
|
@@ -86,12 +84,3 @@ export function getRenderer(ssrContext) {
|
|
|
86
84
|
return process.env.NUXT_NO_SSR || ssrContext.noSSR ? getSPARenderer() : getSSRRenderer();
|
|
87
85
|
}
|
|
88
86
|
export const getSSRStyles = lazyCachedFunction(() => import("#build/dist/server/styles.mjs").then((r) => r.default || r));
|
|
89
|
-
export const getEntryIds = () => getClientManifest().then((r) => {
|
|
90
|
-
const entryIds = [];
|
|
91
|
-
for (const entry of Object.values(r)) {
|
|
92
|
-
if (entry._globalCSS) {
|
|
93
|
-
entryIds.push(entry.src);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return entryIds;
|
|
97
|
-
});
|
package/dist/index.mjs
CHANGED
|
@@ -3830,7 +3830,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3830
3830
|
});
|
|
3831
3831
|
}
|
|
3832
3832
|
|
|
3833
|
-
const version = "4.2.0-
|
|
3833
|
+
const version = "4.2.0-29331210.766a637b";
|
|
3834
3834
|
|
|
3835
3835
|
const createImportProtectionPatterns = (nuxt, options) => {
|
|
3836
3836
|
const patterns = [];
|
|
@@ -4206,7 +4206,8 @@ async function initNitro(nuxt) {
|
|
|
4206
4206
|
"#internal/nuxt/app-config": () => nuxt.vfs["#build/app.config.mjs"]?.replace(/\/\*\* client \*\*\/[\s\S]*\/\*\* client-end \*\*\//, "") || "",
|
|
4207
4207
|
"#spa-template": async () => `export const template = ${JSON.stringify(await spaLoadingTemplate(nuxt))}`,
|
|
4208
4208
|
// this will be overridden in vite plugin
|
|
4209
|
-
"#internal/entry-chunk.mjs": () => `export const entryFileName = undefined
|
|
4209
|
+
"#internal/entry-chunk.mjs": () => `export const entryFileName = undefined`,
|
|
4210
|
+
"#internal/nuxt/entry-ids.mjs": () => `export default []`
|
|
4210
4211
|
},
|
|
4211
4212
|
routeRules: {
|
|
4212
4213
|
"/__nuxt_error": { cache: false }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.2.0-
|
|
3
|
+
"version": "4.2.0-29331210.766a637b",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
|
|
68
68
|
"@nuxt/devalue": "^2.0.2",
|
|
69
69
|
"@nuxt/devtools": "^2.6.5",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.0-
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.0-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.0-29331210.766a637b",
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.0-29331210.766a637b",
|
|
72
72
|
"@nuxt/telemetry": "^2.6.6",
|
|
73
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.0-
|
|
73
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.0-29331210.766a637b",
|
|
74
74
|
"@unhead/vue": "^2.0.14",
|
|
75
75
|
"@vue/shared": "^3.5.22",
|
|
76
76
|
"c12": "^3.3.0",
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
"radix3": "^1.1.2",
|
|
113
113
|
"scule": "^1.3.0",
|
|
114
114
|
"semver": "^7.7.2",
|
|
115
|
+
"seroval": "^1.3.2",
|
|
115
116
|
"std-env": "^3.9.0",
|
|
116
117
|
"tinyglobby": "^0.2.15",
|
|
117
118
|
"ufo": "^1.6.1",
|