nuxt-i18n-micro 3.1.0 → 3.2.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/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/28713582-ff63-460e-a9bf-0ba2b569665f.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +12 -16
- package/dist/runtime/plugins/01.plugin.d.ts +2 -2
- package/package.json +2 -2
- package/dist/client/_nuxt/builds/meta/7cd4f087-6927-4e90-9f5d-48186ff338af.json +0 -1
package/dist/client/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.Gqn9dG-k.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BHdvmNAL.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DCzpQabR.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.B7WZZ6sx.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDGd_lid.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.Gqn9dG-k.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BHdvmNAL.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DCzpQabR.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.B7WZZ6sx.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDGd_lid.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"28713582-ff63-460e-a9bf-0ba2b569665f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770292972325,false]</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.Gqn9dG-k.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BHdvmNAL.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DCzpQabR.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.B7WZZ6sx.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDGd_lid.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.Gqn9dG-k.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BHdvmNAL.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DCzpQabR.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.B7WZZ6sx.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDGd_lid.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"28713582-ff63-460e-a9bf-0ba2b569665f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770292972325,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"28713582-ff63-460e-a9bf-0ba2b569665f","timestamp":1770292969465}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"28713582-ff63-460e-a9bf-0ba2b569665f","timestamp":1770292969465,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.Gqn9dG-k.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BHdvmNAL.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DCzpQabR.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.B7WZZ6sx.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDGd_lid.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BGh93ua4.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.Gqn9dG-k.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BHdvmNAL.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DCzpQabR.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.B7WZZ6sx.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/DDGd_lid.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"28713582-ff63-460e-a9bf-0ba2b569665f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1770292972326,false]</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -388,27 +388,23 @@ const module = defineNuxtModule({
|
|
|
388
388
|
logger.debug('[i18n module] mergedGlobalLocaleRoutes["unlocalized"]:', mergedGlobalLocaleRoutes["unlocalized"]);
|
|
389
389
|
logger.debug("[i18n module] strategy:", options.strategy);
|
|
390
390
|
}
|
|
391
|
-
const strategyFiles = {
|
|
392
|
-
no_prefix: "no-prefix-strategy.mjs",
|
|
393
|
-
prefix: "prefix-strategy.mjs",
|
|
394
|
-
prefix_except_default: "prefix-except-default-strategy.mjs",
|
|
395
|
-
prefix_and_default: "prefix-and-default-strategy.mjs"
|
|
396
|
-
};
|
|
397
|
-
const strategyFile = strategyFiles[options.strategy] ?? strategyFiles.prefix_except_default;
|
|
398
391
|
const require = createRequire(import.meta.url);
|
|
399
|
-
let
|
|
392
|
+
let pathStrategyDir;
|
|
400
393
|
try {
|
|
401
394
|
const pkgPath = require.resolve("@i18n-micro/path-strategy/package.json");
|
|
402
|
-
|
|
395
|
+
pathStrategyDir = dirname(pkgPath);
|
|
403
396
|
} catch {
|
|
404
|
-
|
|
405
|
-
no_prefix: "@i18n-micro/path-strategy/no-prefix",
|
|
406
|
-
prefix: "@i18n-micro/path-strategy/prefix",
|
|
407
|
-
prefix_except_default: "@i18n-micro/path-strategy/prefix-except-default",
|
|
408
|
-
prefix_and_default: "@i18n-micro/path-strategy/prefix-and-default"
|
|
409
|
-
};
|
|
410
|
-
selectedStrategyPath = strategyEntries[options.strategy] ?? strategyEntries.prefix_except_default;
|
|
397
|
+
pathStrategyDir = "@i18n-micro/path-strategy";
|
|
411
398
|
}
|
|
399
|
+
nuxt.options.alias = nuxt.options.alias || {};
|
|
400
|
+
nuxt.options.alias["@i18n-micro/path-strategy"] = pathStrategyDir;
|
|
401
|
+
const strategyDistPaths = {
|
|
402
|
+
no_prefix: "@i18n-micro/path-strategy/dist/no-prefix-strategy.mjs",
|
|
403
|
+
prefix: "@i18n-micro/path-strategy/dist/prefix-strategy.mjs",
|
|
404
|
+
prefix_except_default: "@i18n-micro/path-strategy/dist/prefix-except-default-strategy.mjs",
|
|
405
|
+
prefix_and_default: "@i18n-micro/path-strategy/dist/prefix-and-default-strategy.mjs"
|
|
406
|
+
};
|
|
407
|
+
const selectedStrategyPath = strategyDistPaths[options.strategy] ?? strategyDistPaths.prefix_except_default;
|
|
412
408
|
const routeGenerator = new RouteGenerator({
|
|
413
409
|
locales: options.locales ?? [],
|
|
414
410
|
defaultLocaleCode: defaultLocale,
|
|
@@ -33,7 +33,7 @@ declare const _default: import("nuxt/app").Plugin<{
|
|
|
33
33
|
mergeTranslation(locale: string, routeName: string, newTranslations: Translations, _force?: boolean): Promise<void>;
|
|
34
34
|
mergeGlobalTranslation(locale: string, newTranslations: Translations, _force?: boolean): Promise<void>;
|
|
35
35
|
};
|
|
36
|
-
i18nStrategy: import("~/packages/path-strategy/dist/prefix-except-default-strategy").PrefixExceptDefaultPathStrategy;
|
|
36
|
+
i18nStrategy: import("~/packages/path-strategy/dist/prefix-except-default-strategy.mjs").PrefixExceptDefaultPathStrategy;
|
|
37
37
|
getLocale: (route?: RouteLocationNormalizedLoaded | RouteLocationResolvedGeneric) => string;
|
|
38
38
|
getLocaleName: () => string | null;
|
|
39
39
|
defaultLocale: () => string | undefined;
|
|
@@ -92,7 +92,7 @@ declare const _default: import("nuxt/app").Plugin<{
|
|
|
92
92
|
mergeTranslation(locale: string, routeName: string, newTranslations: Translations, _force?: boolean): Promise<void>;
|
|
93
93
|
mergeGlobalTranslation(locale: string, newTranslations: Translations, _force?: boolean): Promise<void>;
|
|
94
94
|
};
|
|
95
|
-
i18nStrategy: import("~/packages/path-strategy/dist/prefix-except-default-strategy").PrefixExceptDefaultPathStrategy;
|
|
95
|
+
i18nStrategy: import("~/packages/path-strategy/dist/prefix-except-default-strategy.mjs").PrefixExceptDefaultPathStrategy;
|
|
96
96
|
getLocale: (route?: RouteLocationNormalizedLoaded | RouteLocationResolvedGeneric) => string;
|
|
97
97
|
getLocaleName: () => string | null;
|
|
98
98
|
defaultLocale: () => string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.2",
|
|
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",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"globby": "^14.1.0",
|
|
76
76
|
"ufo": "^1.5.4",
|
|
77
77
|
"@i18n-micro/core": "1.1.0",
|
|
78
|
-
"@i18n-micro/path-strategy": "1.0.
|
|
78
|
+
"@i18n-micro/path-strategy": "1.0.3",
|
|
79
79
|
"@i18n-micro/test-utils": "1.1.0",
|
|
80
80
|
"@i18n-micro/route-strategy": "1.1.0",
|
|
81
81
|
"@i18n-micro/types": "1.1.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"7cd4f087-6927-4e90-9f5d-48186ff338af","timestamp":1770291659552,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|