nuxt-i18n-micro 1.76.0 → 1.76.1

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/BBbCCCx2.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BRj5A2lo.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CfVvufsh.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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},1739981286478,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"38589fcc-d716-4bad-b71f-acbb6a83596c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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},1740034866794,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"0f065b20-daea-4835-b9ae-80e874eb1330",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BBbCCCx2.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BRj5A2lo.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CfVvufsh.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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},1739981286479,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"38589fcc-d716-4bad-b71f-acbb6a83596c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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},1740034866794,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"0f065b20-daea-4835-b9ae-80e874eb1330",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -1 +1 @@
1
- {"id":"38589fcc-d716-4bad-b71f-acbb6a83596c","timestamp":1739981280984}
1
+ {"id":"0f065b20-daea-4835-b9ae-80e874eb1330","timestamp":1740034860740}
@@ -0,0 +1 @@
1
+ {"id":"0f065b20-daea-4835-b9ae-80e874eb1330","timestamp":1740034860740,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -8,5 +8,5 @@
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BBbCCCx2.js">
9
9
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BRj5A2lo.css">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CfVvufsh.js">
11
- <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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},1739981286479,false]</script>
12
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"38589fcc-d716-4bad-b71f-acbb6a83596c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
11
+ <script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/MjlAM4Ld.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},1740034866794,false]</script>
12
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"0f065b20-daea-4835-b9ae-80e874eb1330",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.76.0",
4
+ "version": "1.76.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -614,8 +614,9 @@ const module = defineNuxtModule({
614
614
  if (routeRules && Object.keys(routeRules).length && !isNoPrefixStrategy(strategy)) {
615
615
  nitroConfig.routeRules = nitroConfig.routeRules || {};
616
616
  for (const [originalPath, ruleValue] of Object.entries(routeRules)) {
617
- if (originalPath.startsWith("/api"))
617
+ if (originalPath.startsWith("/api")) {
618
618
  continue;
619
+ }
619
620
  localeManager.locales.forEach((localeObj) => {
620
621
  const localeCode = localeObj.code;
621
622
  const isDefaultLocale = localeCode === defaultLocale;
@@ -625,15 +626,16 @@ const module = defineNuxtModule({
625
626
  }
626
627
  const suffix = originalPath === "/" ? "" : originalPath;
627
628
  const localizedPath = `/${localeCode}${suffix}`;
629
+ const { redirect, ...restRuleValue } = ruleValue;
630
+ if (!Object.keys(restRuleValue).length) {
631
+ return;
632
+ }
628
633
  nitroConfig.routeRules = nitroConfig.routeRules || {};
629
634
  nitroConfig.routeRules[localizedPath] = {
630
635
  ...nitroConfig.routeRules[localizedPath],
631
- ...ruleValue
636
+ ...restRuleValue
632
637
  };
633
- if (typeof ruleValue.redirect === "string") {
634
- nitroConfig.routeRules[localizedPath].redirect = `/${localeCode}${ruleValue.redirect}`;
635
- }
636
- logger.debug(`Replicated routeRule for ${localizedPath}: ${JSON.stringify(ruleValue)}`);
638
+ logger.debug(`Replicated routeRule for ${localizedPath}: ${JSON.stringify(restRuleValue)}`);
637
639
  });
638
640
  }
639
641
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
- "version": "1.76.0",
3
+ "version": "1.76.1",
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",
@@ -60,8 +60,8 @@
60
60
  "sirv": "^2.0.4",
61
61
  "ufo": "^1.5.4",
62
62
  "nuxt-i18n-micro-core": "1.0.17",
63
- "nuxt-i18n-micro-types": "1.0.1",
64
- "nuxt-i18n-micro-test-utils": "1.0.6"
63
+ "nuxt-i18n-micro-test-utils": "1.0.6",
64
+ "nuxt-i18n-micro-types": "1.0.1"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@nuxt/devtools": "^2.1.0",
@@ -1 +0,0 @@
1
- {"id":"38589fcc-d716-4bad-b71f-acbb6a83596c","timestamp":1739981280984,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}