nuxt-nightly 4.1.1-29284589.27dc1f24 → 4.1.1-29285117.56aa16c3
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/index.mjs +20 -11
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1151,6 +1151,13 @@ const RouteInjectionPlugin = (nuxt) => createUnplugin(() => {
|
|
|
1151
1151
|
|
|
1152
1152
|
const OPTIONAL_PARAM_RE = /^\/?:.*(?:\?|\(\.\*\)\*)$/;
|
|
1153
1153
|
const runtimeDir = resolve(distDir, "pages/runtime");
|
|
1154
|
+
const pagesImportPresets = [
|
|
1155
|
+
{ imports: ["definePageMeta"], from: resolve(runtimeDir, "composables") },
|
|
1156
|
+
{ imports: ["useLink"], from: "vue-router" }
|
|
1157
|
+
];
|
|
1158
|
+
const routeRulesPresets = [
|
|
1159
|
+
{ imports: ["defineRouteRules"], from: resolve(runtimeDir, "composables") }
|
|
1160
|
+
];
|
|
1154
1161
|
async function resolveRouterOptions(nuxt, builtInRouterOptions) {
|
|
1155
1162
|
const context = {
|
|
1156
1163
|
files: []
|
|
@@ -1472,13 +1479,10 @@ const pagesModule = defineNuxtModule({
|
|
|
1472
1479
|
}
|
|
1473
1480
|
nitro.options.prerender.routes = Array.from(prerenderRoutes);
|
|
1474
1481
|
});
|
|
1475
|
-
nuxt.hook("imports:
|
|
1476
|
-
|
|
1477
|
-
{ name: "definePageMeta", as: "definePageMeta", from: resolve(runtimeDir, "composables") },
|
|
1478
|
-
{ name: "useLink", as: "useLink", from: "vue-router" }
|
|
1479
|
-
);
|
|
1482
|
+
nuxt.hook("imports:sources", (sources) => {
|
|
1483
|
+
sources.push(...pagesImportPresets);
|
|
1480
1484
|
if (nuxt.options.experimental.inlineRouteRules) {
|
|
1481
|
-
|
|
1485
|
+
sources.push(...routeRulesPresets);
|
|
1482
1486
|
}
|
|
1483
1487
|
});
|
|
1484
1488
|
const componentStubPath = await resolvePath(resolve(runtimeDir, "component-stub"));
|
|
@@ -3578,6 +3582,11 @@ const TransformPlugin = ({ ctx, options, sourcemap }) => createUnplugin(() => {
|
|
|
3578
3582
|
};
|
|
3579
3583
|
});
|
|
3580
3584
|
|
|
3585
|
+
const allNuxtPresets = [
|
|
3586
|
+
...pagesImportPresets,
|
|
3587
|
+
...routeRulesPresets,
|
|
3588
|
+
...defaultPresets
|
|
3589
|
+
];
|
|
3581
3590
|
const importsModule = defineNuxtModule({
|
|
3582
3591
|
meta: {
|
|
3583
3592
|
name: "nuxt:imports",
|
|
@@ -3663,8 +3672,8 @@ const importsModule = defineNuxtModule({
|
|
|
3663
3672
|
return IMPORTS_TEMPLATE_RE.test(template.filename);
|
|
3664
3673
|
}
|
|
3665
3674
|
const isIgnored = createIsIgnored(nuxt);
|
|
3666
|
-
const
|
|
3667
|
-
const
|
|
3675
|
+
const nuxtImportSources = new Set(allNuxtPresets.flatMap((i) => i.from));
|
|
3676
|
+
const nuxtImports = new Set(presets.flatMap((p) => nuxtImportSources.has(p.from) ? p.imports : []));
|
|
3668
3677
|
const regenerateImports = async () => {
|
|
3669
3678
|
await ctx.modifyDynamicImports(async (imports) => {
|
|
3670
3679
|
imports.length = 0;
|
|
@@ -3679,9 +3688,9 @@ const importsModule = defineNuxtModule({
|
|
|
3679
3688
|
}
|
|
3680
3689
|
await nuxt.callHook("imports:extend", imports);
|
|
3681
3690
|
for (const i of imports) {
|
|
3682
|
-
if (!
|
|
3691
|
+
if (!nuxtImportSources.has(i.from)) {
|
|
3683
3692
|
const value = i.as || i.name;
|
|
3684
|
-
if (
|
|
3693
|
+
if (nuxtImports.has(value) && (!i.priority || i.priority >= 0)) {
|
|
3685
3694
|
const relativePath = isAbsolute(i.from) ? `${resolveToAlias(i.from, nuxt)}` : i.from;
|
|
3686
3695
|
logger.error(`\`${value}\` is an auto-imported function that is in use by Nuxt. Overriding it will likely cause issues. Please consider renaming \`${value}\` in \`${relativePath}\`.`);
|
|
3687
3696
|
}
|
|
@@ -3760,7 +3769,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3760
3769
|
});
|
|
3761
3770
|
}
|
|
3762
3771
|
|
|
3763
|
-
const version = "4.1.1-
|
|
3772
|
+
const version = "4.1.1-29285117.56aa16c3";
|
|
3764
3773
|
|
|
3765
3774
|
const createImportProtectionPatterns = (nuxt, options) => {
|
|
3766
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-29285117.56aa16c3",
|
|
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-29285117.56aa16c3",
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.1-29285117.56aa16c3",
|
|
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-29285117.56aa16c3",
|
|
74
74
|
"@unhead/vue": "^2.0.14",
|
|
75
75
|
"@vue/shared": "^3.5.20",
|
|
76
76
|
"c12": "^3.2.0",
|