@nuxtjs/i18n-edge 10.4.0-29728007.8564ea1 → 10.4.0-29728115.04c3bbd
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1210,7 +1210,7 @@ const HeistPlugin = (options, ctx, nuxt = useNuxt()) => {
|
|
|
1210
1210
|
}));
|
|
1211
1211
|
};
|
|
1212
1212
|
|
|
1213
|
-
const version = "10.4.0-
|
|
1213
|
+
const version = "10.4.0-29728115.04c3bbd";
|
|
1214
1214
|
|
|
1215
1215
|
async function extendBundler(ctx, nuxt) {
|
|
1216
1216
|
const pluginOptions = {
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import { useNuxtI18nContext, useResolvedLocale } from "../context.js";
|
|
2
2
|
import { detectLocale, loadAndSetLocale, navigate } from "../utils.js";
|
|
3
|
-
import { addRouteMiddleware, defineNuxtPlugin, defineNuxtRouteMiddleware, useNuxtApp
|
|
3
|
+
import { addRouteMiddleware, defineNuxtPlugin, defineNuxtRouteMiddleware, useNuxtApp } from "#imports";
|
|
4
4
|
export default defineNuxtPlugin({
|
|
5
5
|
name: "i18n:plugin:route-locale-detect",
|
|
6
6
|
dependsOn: !__I18N_PRELOAD__ ? ["i18n:plugin"] : ["i18n:plugin", "i18n:plugin:preload"],
|
|
7
7
|
async setup(_nuxt) {
|
|
8
8
|
const nuxt = useNuxtApp(_nuxt._id);
|
|
9
9
|
const ctx = useNuxtI18nContext(nuxt);
|
|
10
|
-
if (__I18N_COMPACT_ROUTES__) {
|
|
11
|
-
const router = useRouter();
|
|
12
|
-
for (const route of router.getRoutes()) {
|
|
13
|
-
if (route.meta?.__i18nCompact && route.meta.key == null) {
|
|
14
|
-
route.meta.key = (r) => r.path;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
10
|
const resolvedLocale = useResolvedLocale();
|
|
19
11
|
await nuxt.runWithContext(
|
|
20
12
|
() => loadAndSetLocale(
|