nuxt-i18n-micro 2.0.0 → 2.1.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.
- 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/df79903a-9996-4527-8269-e47de875a594.json +1 -0
- package/dist/client/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -4
- package/dist/runtime/server/plugins/watcher.dev.js +1 -1
- package/package.json +3 -3
- package/dist/client/_nuxt/builds/meta/9577efa7-2d15-4fca-9d0d-3cd305cdd931.json +0 -1
package/dist/client/200.html
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CBxwnKtU.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BqKd8Zt-.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BYEpoBUk.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/XZXfxmri.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_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
11
|
+
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/XZXfxmri.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},1761933271955,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"df79903a-9996-4527-8269-e47de875a594",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_DEVTOOLS_I18N_BASE__/_nuxt/CBxwnKtU.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BqKd8Zt-.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BYEpoBUk.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/XZXfxmri.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_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
11
|
+
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/XZXfxmri.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},1761933271956,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"df79903a-9996-4527-8269-e47de875a594",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"df79903a-9996-4527-8269-e47de875a594","timestamp":1761933265840}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"df79903a-9996-4527-8269-e47de875a594","timestamp":1761933265840,"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_DEVTOOLS_I18N_BASE__/_nuxt/CBxwnKtU.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.BqKd8Zt-.css">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BYEpoBUk.js">
|
|
11
|
-
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/XZXfxmri.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_DEVTOOLS_I18N_BASE__/",buildId:"
|
|
11
|
+
<script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/XZXfxmri.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},1761933271956,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"df79903a-9996-4527-8269-e47de875a594",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -690,7 +690,6 @@ const module = defineNuxtModule({
|
|
|
690
690
|
autoDetectLanguage: true,
|
|
691
691
|
disablePageLocales: false,
|
|
692
692
|
disableWatcher: false,
|
|
693
|
-
disableUpdater: false,
|
|
694
693
|
// experimental kept in runtimeConfig only to avoid type drift here
|
|
695
694
|
noPrefixRedirect: false,
|
|
696
695
|
includeDefaultLocaleRoute: void 0,
|
|
@@ -733,7 +732,7 @@ const module = defineNuxtModule({
|
|
|
733
732
|
const routeLocales = {};
|
|
734
733
|
const globalLocaleRoutes = {};
|
|
735
734
|
const routeDisableMeta = {};
|
|
736
|
-
const pageFiles = await globby("pages/**/*.vue", { cwd: nuxt.options.rootDir });
|
|
735
|
+
const pageFiles = await globby(["pages/**/*.vue", "app/pages/**/*.vue"], { cwd: nuxt.options.rootDir });
|
|
737
736
|
for (const pageFile of pageFiles) {
|
|
738
737
|
const fullPath = join(nuxt.options.rootDir, pageFile);
|
|
739
738
|
try {
|
|
@@ -741,7 +740,7 @@ const module = defineNuxtModule({
|
|
|
741
740
|
const config = extractDefineI18nRouteData(fileContent, fullPath);
|
|
742
741
|
if (!config) continue;
|
|
743
742
|
const { locales: extractedLocales, localeRoutes, disableMeta } = config;
|
|
744
|
-
const routePath = pageFile.replace(/^pages\//, "/").replace(/\/index\.vue$/, "").replace(/\.vue$/, "").replace(/\/$/, "") || "/";
|
|
743
|
+
const routePath = pageFile.replace(/^(app\/)?pages\//, "/").replace(/\/index\.vue$/, "").replace(/\.vue$/, "").replace(/\/$/, "") || "/";
|
|
745
744
|
if (extractedLocales) {
|
|
746
745
|
if (Array.isArray(extractedLocales)) {
|
|
747
746
|
routeLocales[routePath] = extractedLocales;
|
|
@@ -1089,7 +1088,7 @@ ${accepts}
|
|
|
1089
1088
|
}
|
|
1090
1089
|
});
|
|
1091
1090
|
nuxt.hook("nitro:config", (nitroConfig) => {
|
|
1092
|
-
if (nuxt.options.dev && (options.experimental?.hmr ?? true)
|
|
1091
|
+
if (nuxt.options.dev && (options.experimental?.hmr ?? true)) {
|
|
1093
1092
|
nitroConfig.plugins = nitroConfig.plugins || [];
|
|
1094
1093
|
nitroConfig.plugins.push(resolver.resolve("./runtime/server/plugins/watcher.dev"));
|
|
1095
1094
|
}
|
|
@@ -8,7 +8,7 @@ export default defineNitroPlugin((nitroApp) => {
|
|
|
8
8
|
}
|
|
9
9
|
const config = useRuntimeConfig();
|
|
10
10
|
const i18nConfig = config.i18nConfig;
|
|
11
|
-
if (!i18nConfig ||
|
|
11
|
+
if (!i18nConfig || process.env.NODE_ENV !== "development") {
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
const log = (...args) => i18nConfig.debug && console.log("[i18n-hmr]", ...args);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.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",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"globby": "^14.1.0",
|
|
62
62
|
"sirv": "^2.0.4",
|
|
63
63
|
"ufo": "^1.5.4",
|
|
64
|
+
"nuxt-i18n-micro-core": "1.0.21",
|
|
64
65
|
"nuxt-i18n-micro-test-utils": "1.0.7",
|
|
65
|
-
"nuxt-i18n-micro-types": "1.0.
|
|
66
|
-
"nuxt-i18n-micro-core": "1.0.20"
|
|
66
|
+
"nuxt-i18n-micro-types": "1.0.12"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@nuxt/devtools": "^2.6.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"9577efa7-2d15-4fca-9d0d-3cd305cdd931","timestamp":1761831387055,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|