nuxt-nightly 4.1.2-29293260.327ba8f5 → 4.1.2-29293755.13aef2ae
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/app/composables/preload.js +5 -2
- package/dist/app/composables/router.js +7 -2
- package/dist/app/nuxt.js +4 -1
- package/dist/core/runtime/nitro/handlers/renderer.js +8 -1
- package/dist/core/runtime/nitro/utils/renderer/build-files.js +9 -6
- package/dist/head/runtime/components.js +10 -3
- package/dist/index.mjs +122 -62
- package/dist/pages/runtime/page.js +10 -4
- package/package.json +4 -4
|
@@ -42,8 +42,11 @@ export async function preloadRouteComponents(to, router = useRouter()) {
|
|
|
42
42
|
return Promise.all(promises).then(() => preloadRouteComponents(to, router));
|
|
43
43
|
}
|
|
44
44
|
router._routePreloaded.add(path);
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
for (const route of matched) {
|
|
46
|
+
const component = route.components?.default;
|
|
47
|
+
if (typeof component !== "function") {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
47
50
|
const promise = Promise.resolve(component()).catch(() => {
|
|
48
51
|
}).finally(() => promises.splice(promises.indexOf(promise)));
|
|
49
52
|
promises.push(promise);
|
|
@@ -66,8 +66,13 @@ export const navigateTo = (to, options) => {
|
|
|
66
66
|
const toPath = typeof to === "string" ? to : "path" in to ? resolveRouteObject(to) : useRouter().resolve(to).href;
|
|
67
67
|
if (import.meta.client && options?.open) {
|
|
68
68
|
const { target = "_blank", windowFeatures = {} } = options.open;
|
|
69
|
-
const features =
|
|
70
|
-
|
|
69
|
+
const features = [];
|
|
70
|
+
for (const [feature, value] of Object.entries(windowFeatures)) {
|
|
71
|
+
if (value !== void 0) {
|
|
72
|
+
features.push(`${feature.toLowerCase()}=${value}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
open(toPath, target, features.join(", "));
|
|
71
76
|
return Promise.resolve();
|
|
72
77
|
}
|
|
73
78
|
const isExternalHost = hasProtocol(toPath, { acceptRelative: true });
|
package/dist/app/nuxt.js
CHANGED
|
@@ -260,7 +260,10 @@ function wrappedConfig(runtimeConfig) {
|
|
|
260
260
|
if (!import.meta.dev || import.meta.server) {
|
|
261
261
|
return runtimeConfig;
|
|
262
262
|
}
|
|
263
|
-
const keys =
|
|
263
|
+
const keys = [];
|
|
264
|
+
for (const key in runtimeConfig) {
|
|
265
|
+
keys.push(`\`${key}\``);
|
|
266
|
+
}
|
|
264
267
|
const lastKey = keys.pop();
|
|
265
268
|
return new Proxy(runtimeConfig, {
|
|
266
269
|
get(target, p, receiver) {
|
|
@@ -213,7 +213,14 @@ export default defineRenderHandler(async (event) => {
|
|
|
213
213
|
};
|
|
214
214
|
});
|
|
215
215
|
function normalizeChunks(chunks) {
|
|
216
|
-
|
|
216
|
+
const result = [];
|
|
217
|
+
for (const _chunk of chunks) {
|
|
218
|
+
const chunk = _chunk?.trim();
|
|
219
|
+
if (chunk) {
|
|
220
|
+
result.push(chunk);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return result;
|
|
217
224
|
}
|
|
218
225
|
function joinTags(tags) {
|
|
219
226
|
return tags.join("");
|
|
@@ -86,9 +86,12 @@ export function getRenderer(ssrContext) {
|
|
|
86
86
|
return process.env.NUXT_NO_SSR || ssrContext.noSSR ? getSPARenderer() : getSSRRenderer();
|
|
87
87
|
}
|
|
88
88
|
export const getSSRStyles = lazyCachedFunction(() => import("#build/dist/server/styles.mjs").then((r) => r.default || r));
|
|
89
|
-
export const getEntryIds = () => getClientManifest().then((r) =>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
+
});
|
|
@@ -103,9 +103,16 @@ export const NoScript = defineComponent({
|
|
|
103
103
|
return () => {
|
|
104
104
|
const noscript = normalizeProps(props);
|
|
105
105
|
const slotVnodes = slots.default?.();
|
|
106
|
-
const textContent =
|
|
107
|
-
if (
|
|
108
|
-
|
|
106
|
+
const textContent = [];
|
|
107
|
+
if (slotVnodes) {
|
|
108
|
+
for (const vnode of slotVnodes) {
|
|
109
|
+
if (vnode.children) {
|
|
110
|
+
textContent.push(vnode.children);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (textContent.length > 0) {
|
|
115
|
+
noscript.innerHTML = textContent.join("");
|
|
109
116
|
}
|
|
110
117
|
input.noscript[idx] = noscript;
|
|
111
118
|
return null;
|
package/dist/index.mjs
CHANGED
|
@@ -1325,7 +1325,9 @@ const pagesModule = defineNuxtModule({
|
|
|
1325
1325
|
dts: resolve(nuxt.options.buildDir, declarationFile),
|
|
1326
1326
|
logs: nuxt.options.debug && nuxt.options.debug.router,
|
|
1327
1327
|
async beforeWriteFiles(rootPage) {
|
|
1328
|
-
|
|
1328
|
+
for (const child of rootPage.children) {
|
|
1329
|
+
child.delete();
|
|
1330
|
+
}
|
|
1329
1331
|
const pages = nuxt.apps.default?.pages || await resolvePagesRoutes$1(options.pattern, nuxt);
|
|
1330
1332
|
if (nuxt.apps.default) {
|
|
1331
1333
|
nuxt.apps.default.pages = pages;
|
|
@@ -1345,7 +1347,9 @@ const pagesModule = defineNuxtModule({
|
|
|
1345
1347
|
route.name = page.name;
|
|
1346
1348
|
}
|
|
1347
1349
|
if (page.children) {
|
|
1348
|
-
|
|
1350
|
+
for (const child of page.children) {
|
|
1351
|
+
addPage(route, child, absolutePagePath);
|
|
1352
|
+
}
|
|
1349
1353
|
}
|
|
1350
1354
|
}
|
|
1351
1355
|
for (const page of pages) {
|
|
@@ -1580,10 +1584,20 @@ const pagesModule = defineNuxtModule({
|
|
|
1580
1584
|
getContents: async ({ nuxt: nuxt2 }) => {
|
|
1581
1585
|
const routerOptionsFiles = await resolveRouterOptions(nuxt2, builtInRouterOptions);
|
|
1582
1586
|
const configRouterOptions = genObjectFromRawEntries(Object.entries(nuxt2.options.router.options).map(([key, value]) => [key, genString(value)]));
|
|
1587
|
+
const hashModes = [];
|
|
1588
|
+
for (let index = 0; index < routerOptionsFiles.length; index++) {
|
|
1589
|
+
const file = routerOptionsFiles[index];
|
|
1590
|
+
if (file.path !== builtInRouterOptions) {
|
|
1591
|
+
hashModes.unshift(`routerOptions${index}.hashMode`);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1583
1594
|
return [
|
|
1584
1595
|
...routerOptionsFiles.map((file, index) => genImport(file.path, `routerOptions${index}`)),
|
|
1585
1596
|
`const configRouterOptions = ${configRouterOptions}`,
|
|
1586
|
-
`export const hashMode = ${[
|
|
1597
|
+
`export const hashMode = ${[
|
|
1598
|
+
...hashModes,
|
|
1599
|
+
nuxt2.options.router.options.hashMode
|
|
1600
|
+
].join(" ?? ")}`,
|
|
1587
1601
|
"export default {",
|
|
1588
1602
|
"...configRouterOptions,",
|
|
1589
1603
|
...routerOptionsFiles.map((_, index) => `...routerOptions${index},`),
|
|
@@ -2144,7 +2158,13 @@ export default defineNuxtPlugin({
|
|
|
2144
2158
|
const componentNamesTemplate = {
|
|
2145
2159
|
filename: "component-names.mjs",
|
|
2146
2160
|
getContents({ app }) {
|
|
2147
|
-
|
|
2161
|
+
const componentNames = [];
|
|
2162
|
+
for (const c of app.components) {
|
|
2163
|
+
if (!c.island) {
|
|
2164
|
+
componentNames.push(c.pascalName);
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
return `export const componentNames = ${JSON.stringify(componentNames)}`;
|
|
2148
2168
|
}
|
|
2149
2169
|
};
|
|
2150
2170
|
const componentsIslandsTemplate = {
|
|
@@ -2179,14 +2199,17 @@ const componentsIslandsTemplate = {
|
|
|
2179
2199
|
const NON_VUE_RE = /\b\.(?!vue)\w+$/g;
|
|
2180
2200
|
function resolveComponentTypes(app, baseDir) {
|
|
2181
2201
|
const serverPlaceholderPath = resolve(distDir, "app/components/server-placeholder");
|
|
2182
|
-
const componentTypes =
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
c.pascalName
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2202
|
+
const componentTypes = [];
|
|
2203
|
+
for (const c of app.components) {
|
|
2204
|
+
if (!c.island) {
|
|
2205
|
+
const type = `typeof ${genDynamicImport(isAbsolute(c.filePath) ? relative(baseDir, c.filePath).replace(NON_VUE_RE, "") : c.filePath.replace(NON_VUE_RE, ""), { wrapper: false })}['${c.export}']`;
|
|
2206
|
+
const isServerOnly = c.mode === "server" && c.filePath !== serverPlaceholderPath && !app.components.some((other) => other.pascalName === c.pascalName && other.mode === "client");
|
|
2207
|
+
componentTypes.push([
|
|
2208
|
+
c.pascalName,
|
|
2209
|
+
isServerOnly ? `IslandComponent<${type}>` : type
|
|
2210
|
+
]);
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2190
2213
|
return componentTypes;
|
|
2191
2214
|
}
|
|
2192
2215
|
const islandType = "type IslandComponent<T extends DefineComponent> = T & DefineComponent<{}, {refresh: () => Promise<void>}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, SlotsType<{ fallback: { error: unknown } }>>";
|
|
@@ -2642,7 +2665,13 @@ function getPropsToString(bindings) {
|
|
|
2642
2665
|
if (Object.keys(bindings).length === 0) {
|
|
2643
2666
|
return "undefined";
|
|
2644
2667
|
}
|
|
2645
|
-
const
|
|
2668
|
+
const contentParts = [];
|
|
2669
|
+
for (const [name, value] of Object.entries(bindings)) {
|
|
2670
|
+
if (name && (name !== "_bind" && name !== "v-for")) {
|
|
2671
|
+
contentParts.push(isBinding(name) ? `[\`${name.slice(1)}\`]: ${value}` : `[\`${name}\`]: \`${value}\``);
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
const content = contentParts.join(",");
|
|
2646
2675
|
const data = bindings._bind ? `__mergeProps(${bindings._bind}, { ${content} })` : `{ ${content} }`;
|
|
2647
2676
|
if (!vfor) {
|
|
2648
2677
|
return `[${data}]`;
|
|
@@ -3108,7 +3137,7 @@ const hydrationStrategyMap = {
|
|
|
3108
3137
|
hydrateWhen: "If",
|
|
3109
3138
|
hydrateNever: "Never"
|
|
3110
3139
|
};
|
|
3111
|
-
const
|
|
3140
|
+
const TEMPLATE_WITH_LAZY_HYDRATION_RE = /<template>[\s\S]*\b(?:hydrate-on-idle|hydrateOnIdle|hydrate-on-visible|hydrateOnVisible|hydrate-on-interaction|hydrateOnInteraction|hydrate-on-media-query|hydrateOnMediaQuery|hydrate-after|hydrateAfter|hydrate-when|hydrateWhen|hydrate-never|hydrateNever)\b[\s\S]*<\/template>/;
|
|
3112
3141
|
const LazyHydrationTransformPlugin = (options) => createUnplugin(() => {
|
|
3113
3142
|
const exclude = options.transform?.exclude || [];
|
|
3114
3143
|
const include = options.transform?.include || [];
|
|
@@ -3127,28 +3156,26 @@ const LazyHydrationTransformPlugin = (options) => createUnplugin(() => {
|
|
|
3127
3156
|
},
|
|
3128
3157
|
transform: {
|
|
3129
3158
|
filter: {
|
|
3130
|
-
code: { include:
|
|
3159
|
+
code: { include: TEMPLATE_WITH_LAZY_HYDRATION_RE }
|
|
3131
3160
|
},
|
|
3132
3161
|
async handler(code, id) {
|
|
3133
|
-
const scopeTracker = new ScopeTracker({ preserveExitedScopes: true });
|
|
3134
|
-
for (const { 0: script } of code.matchAll(SCRIPT_RE$1)) {
|
|
3135
|
-
if (!script) {
|
|
3136
|
-
continue;
|
|
3137
|
-
}
|
|
3138
|
-
try {
|
|
3139
|
-
parseAndWalk(script, id, {
|
|
3140
|
-
scopeTracker
|
|
3141
|
-
});
|
|
3142
|
-
} catch {
|
|
3143
|
-
}
|
|
3144
|
-
}
|
|
3145
3162
|
const { 0: template, index: offset = 0 } = code.match(TEMPLATE_RE) || {};
|
|
3146
|
-
if (!template
|
|
3163
|
+
if (!template) {
|
|
3147
3164
|
return;
|
|
3148
3165
|
}
|
|
3149
|
-
const s = new MagicString(code);
|
|
3150
3166
|
try {
|
|
3151
3167
|
const ast = parse(template);
|
|
3168
|
+
const scopeTracker = new ScopeTracker({ preserveExitedScopes: true });
|
|
3169
|
+
for (const { 0: script } of code.matchAll(SCRIPT_RE$1)) {
|
|
3170
|
+
if (!script) {
|
|
3171
|
+
continue;
|
|
3172
|
+
}
|
|
3173
|
+
try {
|
|
3174
|
+
parseAndWalk(script, id, { scopeTracker });
|
|
3175
|
+
} catch {
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3178
|
+
const s = new MagicString(code);
|
|
3152
3179
|
const components = new Set(options.getComponents().map((c) => c.pascalName));
|
|
3153
3180
|
await walk$1(ast, (node) => {
|
|
3154
3181
|
if (node.type !== 1) {
|
|
@@ -3193,14 +3220,14 @@ Rename it to \`<Lazy${pascalCase(node.name)} />\` or remove the lazy-hydration p
|
|
|
3193
3220
|
}
|
|
3194
3221
|
}
|
|
3195
3222
|
});
|
|
3223
|
+
if (s.hasChanged()) {
|
|
3224
|
+
return {
|
|
3225
|
+
code: s.toString(),
|
|
3226
|
+
map: options.sourcemap ? s.generateMap({ hires: true }) : void 0
|
|
3227
|
+
};
|
|
3228
|
+
}
|
|
3196
3229
|
} catch {
|
|
3197
3230
|
}
|
|
3198
|
-
if (s.hasChanged()) {
|
|
3199
|
-
return {
|
|
3200
|
-
code: s.toString(),
|
|
3201
|
-
map: options.sourcemap ? s.generateMap({ hires: true }) : void 0
|
|
3202
|
-
};
|
|
3203
|
-
}
|
|
3204
3231
|
}
|
|
3205
3232
|
}
|
|
3206
3233
|
};
|
|
@@ -3789,7 +3816,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3789
3816
|
});
|
|
3790
3817
|
}
|
|
3791
3818
|
|
|
3792
|
-
const version = "4.1.2-
|
|
3819
|
+
const version = "4.1.2-29293755.13aef2ae";
|
|
3793
3820
|
|
|
3794
3821
|
const createImportProtectionPatterns = (nuxt, options) => {
|
|
3795
3822
|
const patterns = [];
|
|
@@ -4031,20 +4058,26 @@ const LayerAliasingPlugin = (options) => createUnplugin((_options, meta) => {
|
|
|
4031
4058
|
};
|
|
4032
4059
|
});
|
|
4033
4060
|
|
|
4034
|
-
const addModuleTranspiles = (
|
|
4035
|
-
const
|
|
4036
|
-
const
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4061
|
+
const addModuleTranspiles = (nuxt) => {
|
|
4062
|
+
const transpile = [];
|
|
4063
|
+
for (const t of nuxt.options.build.transpile) {
|
|
4064
|
+
if (t instanceof Function) {
|
|
4065
|
+
continue;
|
|
4066
|
+
}
|
|
4067
|
+
if (typeof t === "string") {
|
|
4068
|
+
transpile.push(new RegExp(escapeRE(t)));
|
|
4069
|
+
} else {
|
|
4070
|
+
transpile.push(t);
|
|
4071
|
+
}
|
|
4044
4072
|
}
|
|
4045
|
-
for (const
|
|
4046
|
-
|
|
4047
|
-
|
|
4073
|
+
for (const m of [...nuxt.options.modules, ...nuxt.options._modules]) {
|
|
4074
|
+
const mod = typeof m === "string" ? m : Array.isArray(m) ? m[0] : m.src;
|
|
4075
|
+
if (typeof mod !== "string") {
|
|
4076
|
+
continue;
|
|
4077
|
+
}
|
|
4078
|
+
const path = normalizeModuleTranspilePath(mod);
|
|
4079
|
+
if (!transpile.some((t) => t.test(path))) {
|
|
4080
|
+
nuxt.options.build.transpile.push(path);
|
|
4048
4081
|
}
|
|
4049
4082
|
}
|
|
4050
4083
|
};
|
|
@@ -4062,10 +4095,24 @@ const NODE_MODULES_RE = /(?<=\/)node_modules\/(.+)$/;
|
|
|
4062
4095
|
const PNPM_NODE_MODULES_RE = /\.pnpm\/.+\/node_modules\/(.+)$/;
|
|
4063
4096
|
async function initNitro(nuxt) {
|
|
4064
4097
|
const layerDirs = getLayerDirectories(nuxt);
|
|
4065
|
-
const excludePaths =
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4098
|
+
const excludePaths = [];
|
|
4099
|
+
for (const dirs of layerDirs) {
|
|
4100
|
+
const paths = [
|
|
4101
|
+
dirs.root.match(NODE_MODULES_RE)?.[1]?.replace(/\/$/, ""),
|
|
4102
|
+
dirs.root.match(PNPM_NODE_MODULES_RE)?.[1]?.replace(/\/$/, "")
|
|
4103
|
+
];
|
|
4104
|
+
for (const dir of paths) {
|
|
4105
|
+
if (dir) {
|
|
4106
|
+
excludePaths.push(escapeRE(dir));
|
|
4107
|
+
}
|
|
4108
|
+
}
|
|
4109
|
+
}
|
|
4110
|
+
const layerPublicAssetsDirs = [];
|
|
4111
|
+
for (const dirs of layerDirs) {
|
|
4112
|
+
if (existsSync(dirs.public)) {
|
|
4113
|
+
layerPublicAssetsDirs.push({ dir: dirs.public });
|
|
4114
|
+
}
|
|
4115
|
+
}
|
|
4069
4116
|
const excludePattern = excludePaths.length ? [new RegExp(`node_modules\\/(?!${excludePaths.join("|")})`)] : [/node_modules/];
|
|
4070
4117
|
const rootDirWithSlash = withTrailingSlash$1(nuxt.options.rootDir);
|
|
4071
4118
|
const moduleEntryPaths = [];
|
|
@@ -4170,7 +4217,7 @@ async function initNitro(nuxt) {
|
|
|
4170
4217
|
join(moduleDir, "dist/runtime/server")
|
|
4171
4218
|
];
|
|
4172
4219
|
}),
|
|
4173
|
-
...
|
|
4220
|
+
...layerDirs.map((dirs) => relativeWithDot(nuxt.options.buildDir, join(dirs.shared, "**/*.d.ts")))
|
|
4174
4221
|
],
|
|
4175
4222
|
exclude: [
|
|
4176
4223
|
...nuxt.options.modulesDir.map((m) => relativeWithDot(nuxt.options.buildDir, m)),
|
|
@@ -4185,7 +4232,7 @@ async function initNitro(nuxt) {
|
|
|
4185
4232
|
maxAge: 31536e3,
|
|
4186
4233
|
baseURL: nuxt.options.app.buildAssetsDir
|
|
4187
4234
|
},
|
|
4188
|
-
...
|
|
4235
|
+
...layerPublicAssetsDirs
|
|
4189
4236
|
],
|
|
4190
4237
|
prerender: {
|
|
4191
4238
|
ignoreUnprefixedPublicAssets: true,
|
|
@@ -4207,7 +4254,7 @@ async function initNitro(nuxt) {
|
|
|
4207
4254
|
"nuxt-nightly/dist",
|
|
4208
4255
|
distDir,
|
|
4209
4256
|
// Ensure app config files have auto-imports injected even if they are pure .js files
|
|
4210
|
-
...
|
|
4257
|
+
...layerDirs.map((dirs) => join(dirs.app, "app.config"))
|
|
4211
4258
|
],
|
|
4212
4259
|
traceInclude: [
|
|
4213
4260
|
// force include files used in generated code from the runtime-compiler
|
|
@@ -5671,9 +5718,11 @@ Using \`${fallbackCompatibilityDate}\` as fallback. More info at: ${colors.under
|
|
|
5671
5718
|
});
|
|
5672
5719
|
}
|
|
5673
5720
|
nuxt.options.build.transpile.push("nuxt/app");
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5721
|
+
for (const layer of layerDirs) {
|
|
5722
|
+
if (layer.root.includes("node_modules")) {
|
|
5723
|
+
nuxt.options.build.transpile.push(layer.root.replace(/\/$/, ""));
|
|
5724
|
+
}
|
|
5725
|
+
}
|
|
5677
5726
|
const locallyScannedLayersDirs = layerDirs.map((l) => join(l.root, "layers/"));
|
|
5678
5727
|
const rootWithTrailingSlash = withTrailingSlash(nuxt.options.rootDir);
|
|
5679
5728
|
for (const dirs of layerDirs) {
|
|
@@ -5899,8 +5948,13 @@ export default defineNuxtPlugin({
|
|
|
5899
5948
|
return nuxt.callHook("restart");
|
|
5900
5949
|
}
|
|
5901
5950
|
});
|
|
5902
|
-
nuxt.options.build.transpile = nuxt.options.build.transpile.map((t) =>
|
|
5903
|
-
|
|
5951
|
+
nuxt.options.build.transpile = nuxt.options.build.transpile.map((t) => {
|
|
5952
|
+
if (typeof t !== "string") {
|
|
5953
|
+
return t;
|
|
5954
|
+
}
|
|
5955
|
+
return normalize(t).split("node_modules/").pop();
|
|
5956
|
+
});
|
|
5957
|
+
addModuleTranspiles(nuxt);
|
|
5904
5958
|
await initNitro(nuxt);
|
|
5905
5959
|
const nitro = useNitro();
|
|
5906
5960
|
if (nitro.options.static && nuxt.options.experimental.payloadExtraction === void 0) {
|
|
@@ -5946,9 +6000,15 @@ async function loadNuxt(opts) {
|
|
|
5946
6000
|
}
|
|
5947
6001
|
}
|
|
5948
6002
|
options._modules.push(pagesModule, metaModule, componentsModule);
|
|
6003
|
+
const importIncludes = [];
|
|
6004
|
+
for (const layer of options._layers) {
|
|
6005
|
+
if (layer.cwd && layer.cwd.includes("node_modules")) {
|
|
6006
|
+
importIncludes.push(new RegExp(`(^|\\/)${escapeRE(layer.cwd.split("node_modules/").pop())}(\\/|$)(?!node_modules\\/)`));
|
|
6007
|
+
}
|
|
6008
|
+
}
|
|
5949
6009
|
options._modules.push([importsModule, {
|
|
5950
6010
|
transform: {
|
|
5951
|
-
include:
|
|
6011
|
+
include: importIncludes
|
|
5952
6012
|
}
|
|
5953
6013
|
}]);
|
|
5954
6014
|
options._modules.push(schemaModule);
|
|
@@ -170,10 +170,16 @@ export default defineComponent({
|
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
172
|
function _mergeTransitionProps(routeProps) {
|
|
173
|
-
const _props =
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
const _props = [];
|
|
174
|
+
for (const prop of routeProps) {
|
|
175
|
+
if (!prop) {
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
_props.push({
|
|
179
|
+
...prop,
|
|
180
|
+
onAfterLeave: prop.onAfterLeave ? toArray(prop.onAfterLeave) : void 0
|
|
181
|
+
});
|
|
182
|
+
}
|
|
177
183
|
return defu(..._props);
|
|
178
184
|
}
|
|
179
185
|
function haveParentRoutesRendered(fork, newRoute, Component) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.1.2-
|
|
3
|
+
"version": "4.1.2-29293755.13aef2ae",
|
|
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.2-
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.2-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.1.2-29293755.13aef2ae",
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.2-29293755.13aef2ae",
|
|
72
72
|
"@nuxt/telemetry": "^2.6.6",
|
|
73
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.1.2-
|
|
73
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.1.2-29293755.13aef2ae",
|
|
74
74
|
"@unhead/vue": "^2.0.14",
|
|
75
75
|
"@vue/shared": "^3.5.21",
|
|
76
76
|
"c12": "^3.2.0",
|