nuxt-i18n-micro 1.21.2 → 1.21.4
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/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/5beda9dc-b03a-48eb-9130-880c63a71b4a.json +1 -0
- package/dist/client/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -4
- package/dist/runtime/plugins/01.plugin.js +3 -1
- package/dist/runtime/plugins/03.define.js +3 -1
- package/package.json +1 -1
- package/dist/client/_nuxt/builds/meta/afbd0dc5-4712-4f90-84d1-65082f48a5a1.json +0 -1
package/dist/client/200.html
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/CnNUpwZL.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-i18n-micro/_nuxt/error-500.CBAEdpZV.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/BKcmVa-6.js">
|
|
11
|
-
<script type="module" src="/__nuxt-i18n-micro/_nuxt/CeFL7aT9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
11
|
+
<script type="module" src="/__nuxt-i18n-micro/_nuxt/CeFL7aT9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1727883256486,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"5beda9dc-b03a-48eb-9130-880c63a71b4a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/CnNUpwZL.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-i18n-micro/_nuxt/error-500.CBAEdpZV.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/BKcmVa-6.js">
|
|
11
|
-
<script type="module" src="/__nuxt-i18n-micro/_nuxt/CeFL7aT9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
11
|
+
<script type="module" src="/__nuxt-i18n-micro/_nuxt/CeFL7aT9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1727883256486,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"5beda9dc-b03a-48eb-9130-880c63a71b4a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"5beda9dc-b03a-48eb-9130-880c63a71b4a","timestamp":1727883245976}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"5beda9dc-b03a-48eb-9130-880c63a71b4a","timestamp":1727883245976,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/CnNUpwZL.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-i18n-micro/_nuxt/error-500.CBAEdpZV.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/BKcmVa-6.js">
|
|
11
|
-
<script type="module" src="/__nuxt-i18n-micro/_nuxt/CeFL7aT9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
11
|
+
<script type="module" src="/__nuxt-i18n-micro/_nuxt/CeFL7aT9.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1727883256486,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"5beda9dc-b03a-48eb-9130-880c63a71b4a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -482,13 +482,14 @@ const module = defineNuxtModule({
|
|
|
482
482
|
}
|
|
483
483
|
pageManager.extendPages(pages, nuxt.options.rootDir);
|
|
484
484
|
nuxt.options.generate.routes = Array.isArray(nuxt.options.generate.routes) ? nuxt.options.generate.routes : [];
|
|
485
|
+
const prerenderRoutes = [];
|
|
485
486
|
localeManager.locales.forEach((locale) => {
|
|
486
487
|
if (!options.disablePageLocales) {
|
|
487
488
|
pagesNames.forEach((name) => {
|
|
488
|
-
|
|
489
|
+
prerenderRoutes.push(`/_locales/${name}/${locale.code}/data.json`);
|
|
489
490
|
});
|
|
490
491
|
}
|
|
491
|
-
|
|
492
|
+
prerenderRoutes.push(`/_locales/general/${locale.code}/data.json`);
|
|
492
493
|
});
|
|
493
494
|
if (isCloudflarePages) {
|
|
494
495
|
const processPageWithChildren = (page, parentPath = "") => {
|
|
@@ -503,11 +504,11 @@ const module = defineNuxtModule({
|
|
|
503
504
|
if (availableLocales.includes(localeCode)) {
|
|
504
505
|
let localizedPath = fullPath;
|
|
505
506
|
localizedPath = localizedPath.replace(/:locale\([^)]+\)/, localeCode);
|
|
506
|
-
|
|
507
|
+
prerenderRoutes.push(localizedPath);
|
|
507
508
|
}
|
|
508
509
|
});
|
|
509
510
|
} else {
|
|
510
|
-
|
|
511
|
+
prerenderRoutes.push(fullPath);
|
|
511
512
|
}
|
|
512
513
|
if (page.children && page.children.length) {
|
|
513
514
|
page.children.forEach((childPage) => processPageWithChildren(childPage, fullPath));
|
|
@@ -517,6 +518,7 @@ const module = defineNuxtModule({
|
|
|
517
518
|
processPageWithChildren(page);
|
|
518
519
|
});
|
|
519
520
|
}
|
|
521
|
+
addPrerenderRoutes(prerenderRoutes);
|
|
520
522
|
});
|
|
521
523
|
nuxt.hook("nitro:config", (nitroConfig) => {
|
|
522
524
|
const routes = nitroConfig.prerender?.routes || [];
|
|
@@ -149,7 +149,9 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|
|
149
149
|
const routeName = getRouteName(to, locale);
|
|
150
150
|
i18nHelper.mergeTranslation(selectedLocale ?? locale, routeName, translations, true);
|
|
151
151
|
}, locale);
|
|
152
|
-
next
|
|
152
|
+
if (next) {
|
|
153
|
+
next();
|
|
154
|
+
}
|
|
153
155
|
});
|
|
154
156
|
const getTranslation = (key, params, defaultValue) => {
|
|
155
157
|
if (!key) return "";
|
|
@@ -43,7 +43,9 @@ export default defineNuxtPlugin(async (_nuxtApp) => {
|
|
|
43
43
|
if (i18nConfig.includeDefaultLocaleRoute) {
|
|
44
44
|
await handleRedirect(to);
|
|
45
45
|
}
|
|
46
|
-
next
|
|
46
|
+
if (next) {
|
|
47
|
+
next();
|
|
48
|
+
}
|
|
47
49
|
});
|
|
48
50
|
const defineI18nRoute = async (routeDefinition) => {
|
|
49
51
|
const currentLocale = (route.params.locale || i18nConfig.defaultLocale).toString();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.4",
|
|
4
4
|
"description": "Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.",
|
|
5
5
|
"repository": "s00d/nuxt-i18n-micro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"afbd0dc5-4712-4f90-84d1-65082f48a5a1","timestamp":1727612800558,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|