@nuxt/kit 4.0.0-alpha.1 → 4.0.0-alpha.2
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -2
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -372,7 +372,7 @@ declare function useNitro(): Nitro;
|
|
|
372
372
|
/**
|
|
373
373
|
* Add server imports to be auto-imported by Nitro
|
|
374
374
|
*/
|
|
375
|
-
declare function addServerImports(imports: Import[]): void;
|
|
375
|
+
declare function addServerImports(imports: Import | Import[]): void;
|
|
376
376
|
/**
|
|
377
377
|
* Add directories to be scanned for auto-imports by Nitro
|
|
378
378
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -372,7 +372,7 @@ declare function useNitro(): Nitro;
|
|
|
372
372
|
/**
|
|
373
373
|
* Add server imports to be auto-imported by Nitro
|
|
374
374
|
*/
|
|
375
|
-
declare function addServerImports(imports: Import[]): void;
|
|
375
|
+
declare function addServerImports(imports: Import | Import[]): void;
|
|
376
376
|
/**
|
|
377
377
|
* Add directories to be scanned for auto-imports by Nitro
|
|
378
378
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -702,7 +702,7 @@ async function loadNuxtSchema(cwd) {
|
|
|
702
702
|
const urls = [url];
|
|
703
703
|
const nuxtPath = resolveModuleURL("nuxt", { try: true, from: url }) ?? resolveModuleURL("nuxt-nightly", { try: true, from: url });
|
|
704
704
|
if (nuxtPath) {
|
|
705
|
-
urls.unshift(
|
|
705
|
+
urls.unshift(nuxtPath);
|
|
706
706
|
}
|
|
707
707
|
const schemaPath = resolveModuleURL("@nuxt/schema", { try: true, from: urls }) ?? "@nuxt/schema";
|
|
708
708
|
return await import(schemaPath).then((r) => r.NuxtConfigSchema);
|
|
@@ -794,10 +794,11 @@ function useNitro() {
|
|
|
794
794
|
}
|
|
795
795
|
function addServerImports(imports) {
|
|
796
796
|
const nuxt = useNuxt();
|
|
797
|
+
const _imports = toArray(imports);
|
|
797
798
|
nuxt.hook("nitro:config", (config) => {
|
|
798
799
|
config.imports ||= {};
|
|
799
800
|
config.imports.imports ||= [];
|
|
800
|
-
config.imports.imports.push(...
|
|
801
|
+
config.imports.imports.push(..._imports);
|
|
801
802
|
});
|
|
802
803
|
}
|
|
803
804
|
function addServerImportsDir(dirs, opts = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/kit",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"untyped": "^2.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@rspack/core": "1.3.
|
|
49
|
+
"@rspack/core": "1.3.15",
|
|
50
50
|
"@types/semver": "7.7.0",
|
|
51
51
|
"hookable": "5.5.3",
|
|
52
52
|
"nitropack": "2.11.12",
|
|
53
53
|
"unbuild": "3.5.0",
|
|
54
54
|
"vite": "6.3.5",
|
|
55
|
-
"vitest": "3.2.
|
|
56
|
-
"webpack": "5.99.
|
|
57
|
-
"@nuxt/schema": "4.0.0-alpha.
|
|
55
|
+
"vitest": "3.2.3",
|
|
56
|
+
"webpack": "5.99.9",
|
|
57
|
+
"@nuxt/schema": "4.0.0-alpha.2"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=18.12.0"
|