nuxt-nightly 4.1.1-29285117.56aa16c3 → 4.1.1-29287305.25f9282a
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.
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
renderResourceHeaders
|
|
7
7
|
} from "vue-bundle-renderer/runtime";
|
|
8
8
|
import { appendResponseHeader, createError, getQuery, getResponseStatus, getResponseStatusText, writeEarlyHints } from "h3";
|
|
9
|
-
import { getQuery as getURLQuery, joinURL, withoutTrailingSlash } from "ufo";
|
|
9
|
+
import { getQuery as getURLQuery, hasProtocol, joinURL, withoutTrailingSlash } 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";
|
|
@@ -20,6 +20,7 @@ import { renderSSRHeadOptions } from "#internal/unhead.config.mjs";
|
|
|
20
20
|
import { appHead, appTeleportAttrs, appTeleportTag, componentIslands, appManifest as isAppManifestEnabled } from "#internal/nuxt.config.mjs";
|
|
21
21
|
import { entryFileName } from "#internal/entry-chunk.mjs";
|
|
22
22
|
import { buildAssetsURL, publicAssetsURL } from "#internal/nuxt/paths";
|
|
23
|
+
import { relative } from "pathe";
|
|
23
24
|
globalThis.__buildAssetsURL = buildAssetsURL;
|
|
24
25
|
globalThis.__publicAssetsURL = publicAssetsURL;
|
|
25
26
|
if (process.env.NUXT_ASYNC_CONTEXT && !("AsyncLocalStorage" in globalThis)) {
|
|
@@ -30,6 +31,7 @@ const APP_TELEPORT_OPEN_TAG = HAS_APP_TELEPORTS ? `<${appTeleportTag}${propsToSt
|
|
|
30
31
|
const APP_TELEPORT_CLOSE_TAG = HAS_APP_TELEPORTS ? `</${appTeleportTag}>` : "";
|
|
31
32
|
const PAYLOAD_URL_RE = process.env.NUXT_JSON_PAYLOADS ? /^[^?]*\/_payload.json(?:\?.*)?$/ : /^[^?]*\/_payload.js(?:\?.*)?$/;
|
|
32
33
|
const PAYLOAD_FILENAME = process.env.NUXT_JSON_PAYLOADS ? "_payload.json" : "_payload.js";
|
|
34
|
+
let entryPath;
|
|
33
35
|
export default defineRenderHandler(async (event) => {
|
|
34
36
|
const nitroApp = useNitroApp();
|
|
35
37
|
const ssrError = event.path.startsWith("/__nuxt_error") ? getQuery(event) : null;
|
|
@@ -109,12 +111,24 @@ export default defineRenderHandler(async (event) => {
|
|
|
109
111
|
const NO_SCRIPTS = process.env.NUXT_NO_SCRIPTS || routeOptions.noScripts;
|
|
110
112
|
const { styles, scripts } = getRequestDependencies(ssrContext, renderer.rendererContext);
|
|
111
113
|
if (entryFileName && !NO_SCRIPTS) {
|
|
114
|
+
let path = entryPath;
|
|
115
|
+
if (!path) {
|
|
116
|
+
path = buildAssetsURL(entryFileName);
|
|
117
|
+
if (/^(?:\/|\.+\/)/.test(path) || hasProtocol(path, { acceptRelative: true })) {
|
|
118
|
+
entryPath = path;
|
|
119
|
+
} else {
|
|
120
|
+
path = relative(event.path.replace(/\/[^/]+$/, "/"), joinURL("/", path));
|
|
121
|
+
if (!/^(?:\/|\.+\/)/.test(path)) {
|
|
122
|
+
path = `./${path}`;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
112
126
|
ssrContext.head.push({
|
|
113
127
|
script: [{
|
|
114
128
|
tagPosition: "head",
|
|
115
129
|
tagPriority: -2,
|
|
116
130
|
type: "importmap",
|
|
117
|
-
innerHTML: JSON.stringify({ imports: { "#entry":
|
|
131
|
+
innerHTML: JSON.stringify({ imports: { "#entry": path } })
|
|
118
132
|
}]
|
|
119
133
|
}, headEntryOptions);
|
|
120
134
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3769,7 +3769,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3769
3769
|
});
|
|
3770
3770
|
}
|
|
3771
3771
|
|
|
3772
|
-
const version = "4.1.1-
|
|
3772
|
+
const version = "4.1.1-29287305.25f9282a";
|
|
3773
3773
|
|
|
3774
3774
|
const createImportProtectionPatterns = (nuxt, options) => {
|
|
3775
3775
|
const patterns = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.1.1-
|
|
3
|
+
"version": "4.1.1-29287305.25f9282a",
|
|
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.3",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.1.1-
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.1-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.1.1-29287305.25f9282a",
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.1-29287305.25f9282a",
|
|
72
72
|
"@nuxt/telemetry": "^2.6.6",
|
|
73
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.1.1-
|
|
73
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.1.1-29287305.25f9282a",
|
|
74
74
|
"@unhead/vue": "^2.0.14",
|
|
75
75
|
"@vue/shared": "^3.5.20",
|
|
76
76
|
"c12": "^3.2.0",
|