@nuxt/kit 3.1.1 → 3.1.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/README.md +1 -1
- package/dist/index.mjs +7 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -114,7 +114,7 @@ Follow the docs to [Set Up Your Local Development Environment](https://nuxt.com/
|
|
|
114
114
|
|
|
115
115
|
## Nuxt 2
|
|
116
116
|
|
|
117
|
-
You can find the code for Nuxt 2 on the [`2.x
|
|
117
|
+
You can find the code for Nuxt 2 on the [`2.x` branch](https://github.com/nuxt/nuxt/tree/2.x) and the documentation at [nuxtjs.org](https://nuxtjs.org).
|
|
118
118
|
|
|
119
119
|
## Follow us
|
|
120
120
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { promises, existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import
|
|
2
|
+
import { defu } from 'defu';
|
|
3
3
|
import { applyDefaults } from 'untyped';
|
|
4
4
|
import { dirname, join, normalize, relative, isAbsolute, resolve, basename, parse } from 'pathe';
|
|
5
5
|
import consola from 'consola';
|
|
@@ -147,7 +147,7 @@ function defineNuxtModule(definition) {
|
|
|
147
147
|
if (uniqueKey) {
|
|
148
148
|
nuxt.options._requiredModules = nuxt.options._requiredModules || {};
|
|
149
149
|
if (nuxt.options._requiredModules[uniqueKey]) {
|
|
150
|
-
return;
|
|
150
|
+
return false;
|
|
151
151
|
}
|
|
152
152
|
nuxt.options._requiredModules[uniqueKey] = true;
|
|
153
153
|
}
|
|
@@ -432,7 +432,10 @@ async function resolveFiles(path, pattern, opts = {}) {
|
|
|
432
432
|
async function installModule(moduleToInstall, _inlineOptions, _nuxt) {
|
|
433
433
|
const nuxt = useNuxt();
|
|
434
434
|
const { nuxtModule, inlineOptions } = await normalizeModule(moduleToInstall, _inlineOptions);
|
|
435
|
-
await nuxtModule(inlineOptions, nuxt);
|
|
435
|
+
const res = await nuxtModule(inlineOptions, nuxt);
|
|
436
|
+
if (res === false) {
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
436
439
|
if (typeof moduleToInstall === "string") {
|
|
437
440
|
nuxt.options.build.transpile.push(moduleToInstall);
|
|
438
441
|
}
|
|
@@ -752,7 +755,7 @@ function extendRouteRules(route, rule, options = {}) {
|
|
|
752
755
|
if (!opts.routeRules) {
|
|
753
756
|
opts.routeRules = {};
|
|
754
757
|
}
|
|
755
|
-
opts.routeRules[route] = options.override ? defu
|
|
758
|
+
opts.routeRules[route] = options.override ? defu(rule, opts.routeRules[route]) : defu(opts.routeRules[route], rule);
|
|
756
759
|
}
|
|
757
760
|
}
|
|
758
761
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/kit",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"repository": "nuxt/nuxt",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@nuxt/schema": "3.1.
|
|
13
|
+
"@nuxt/schema": "3.1.2",
|
|
14
14
|
"c12": "^1.1.0",
|
|
15
15
|
"consola": "^2.15.3",
|
|
16
16
|
"defu": "^6.1.2",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"scule": "^1.0.0",
|
|
27
27
|
"semver": "^7.3.8",
|
|
28
28
|
"unctx": "^2.1.1",
|
|
29
|
-
"unimport": "^2.0
|
|
29
|
+
"unimport": "^2.1.0",
|
|
30
30
|
"untyped": "^1.2.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|