nuxt-i18n-micro 1.88.1 → 1.89.0

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.
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/wFfez25B.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.0eydygwr.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDsBobp8.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BAeNieJD.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},1752749795496,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"89d5eeff-5e9b-4e90-8d4b-b863030d443b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BAeNieJD.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},1754719495852,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"f9f50f20-eeba-4e27-be51-939811ea107e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/wFfez25B.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.0eydygwr.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDsBobp8.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BAeNieJD.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},1752749795497,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"89d5eeff-5e9b-4e90-8d4b-b863030d443b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BAeNieJD.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},1754719495852,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"f9f50f20-eeba-4e27-be51-939811ea107e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -1 +1 @@
1
- {"id":"89d5eeff-5e9b-4e90-8d4b-b863030d443b","timestamp":1752749789480}
1
+ {"id":"f9f50f20-eeba-4e27-be51-939811ea107e","timestamp":1754719491099}
@@ -0,0 +1 @@
1
+ {"id":"f9f50f20-eeba-4e27-be51-939811ea107e","timestamp":1754719491099,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/wFfez25B.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.0eydygwr.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDsBobp8.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BAeNieJD.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},1752749795497,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"89d5eeff-5e9b-4e90-8d4b-b863030d443b",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BAeNieJD.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},1754719495852,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"f9f50f20-eeba-4e27-be51-939811ea107e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
3
  "configKey": "i18n",
4
- "version": "1.88.1",
4
+ "version": "1.89.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -463,6 +463,7 @@ class LocaleManager {
463
463
  }
464
464
  }
465
465
 
466
+ const isInternalPath = (p) => /(?:^|\/)__[^/]+/.test(p);
466
467
  function generateI18nTypes() {
467
468
  return `
468
469
  import type {PluginsInjections} from "nuxt-i18n-micro";
@@ -752,9 +753,10 @@ const module = defineNuxtModule({
752
753
  nuxt.options.generate.routes = Array.isArray(nuxt.options.generate.routes) ? nuxt.options.generate.routes : [];
753
754
  const pages = nuxt.options.generate.routes || [];
754
755
  localeManager.locales.forEach((locale) => {
755
- if (locale.code !== defaultLocale || withPrefixStrategy(options.strategy)) {
756
+ const shouldGenerate = locale.code !== defaultLocale || withPrefixStrategy(options.strategy);
757
+ if (shouldGenerate) {
756
758
  pages.forEach((page) => {
757
- if (!/\.[a-z0-9]+$/i.test(page)) {
759
+ if (!/\.[a-z0-9]+$/i.test(page) && !isInternalPath(page)) {
758
760
  routes.push(`/${locale.code}${page}`);
759
761
  }
760
762
  });
@@ -801,9 +803,10 @@ const module = defineNuxtModule({
801
803
  const routesSet = prerenderRoutes.routes;
802
804
  const additionalRoutes = /* @__PURE__ */ new Set();
803
805
  routesSet.forEach((route) => {
804
- if (!/\.[a-z0-9]+$/i.test(route)) {
806
+ if (!/\.[a-z0-9]+$/i.test(route) && !isInternalPath(route)) {
805
807
  localeManager.locales.forEach((locale) => {
806
- if (locale.code !== defaultLocale) {
808
+ const shouldGenerate = locale.code !== defaultLocale || withPrefixStrategy(options.strategy);
809
+ if (shouldGenerate) {
807
810
  if (route === "/") {
808
811
  additionalRoutes.add(`/${locale.code}`);
809
812
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
- "version": "1.88.1",
3
+ "version": "1.89.0",
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":"89d5eeff-5e9b-4e90-8d4b-b863030d443b","timestamp":1752749789480,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}