nuxt-i18n-micro 1.29.2 → 1.29.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 +6 -6
- package/dist/client/404.html +6 -6
- package/dist/client/_nuxt/{DwTifKvh.js → 0GmYR_kR.js} +1 -1
- package/dist/client/_nuxt/{D8Lez-Ba.js → 2C6ahHCU.js} +1 -1
- package/dist/client/_nuxt/{DxRkfQGy.js → BfH8Q6Ot.js} +1 -1
- package/dist/client/_nuxt/Czi4MokJ.js +98 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/1d2bb48d-d8b2-43ed-82ce-c5dcf5a0446d.json +1 -0
- package/dist/client/index.html +6 -6
- package/dist/module.d.mts +1 -0
- package/dist/module.d.ts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +27 -1
- package/package.json +1 -1
- package/dist/client/_nuxt/DPXS1ORf.js +0 -98
- package/dist/client/_nuxt/builds/meta/e18fbf0a-a21f-43a7-bdc0-7397e9d5fecd.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"1d2bb48d-d8b2-43ed-82ce-c5dcf5a0446d","timestamp":1729515371381}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"1d2bb48d-d8b2-43ed-82ce-c5dcf5a0446d","timestamp":1729515371381,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!DOCTYPE html><html data-capo=""><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
3
|
<link rel="stylesheet" href="/__nuxt-i18n-micro/_nuxt/entry.BqOlM4b6.css">
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/Czi4MokJ.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/B6E6ObS_.js">
|
|
6
6
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-i18n-micro/_nuxt/error-404.C_4C5G96.css">
|
|
7
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/
|
|
8
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/BfH8Q6Ot.js">
|
|
8
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/0GmYR_kR.js">
|
|
9
9
|
<link rel="prefetch" as="style" crossorigin href="/__nuxt-i18n-micro/_nuxt/error-500.CBAEdpZV.css">
|
|
10
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/
|
|
11
|
-
<script type="module" src="/__nuxt-i18n-micro/_nuxt/
|
|
12
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"
|
|
10
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt-i18n-micro/_nuxt/2C6ahHCU.js">
|
|
11
|
+
<script type="module" src="/__nuxt-i18n-micro/_nuxt/Czi4MokJ.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},1729515383946,false]</script>
|
|
12
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-i18n-micro",buildId:"1d2bb48d-d8b2-43ed-82ce-c5dcf5a0446d",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import fs__default, { readFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
4
|
-
import { useNuxt, defineNuxtModule, useLogger, createResolver, addPlugin, addImportsDir, addServerHandler, addComponentsDir, extendPages, addPrerenderRoutes } from '@nuxt/kit';
|
|
4
|
+
import { useNuxt, defineNuxtModule, useLogger, createResolver, addPlugin, addImportsDir, addServerHandler, addComponentsDir, addTypeTemplate, extendPages, addPrerenderRoutes } from '@nuxt/kit';
|
|
5
5
|
import { watch } from 'chokidar';
|
|
6
6
|
import { onDevToolsInitialized, extendServerRpc } from '@nuxt/devtools-kit';
|
|
7
7
|
|
|
@@ -364,6 +364,25 @@ class LocaleManager {
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
+
function generateI18nTypes() {
|
|
368
|
+
return `
|
|
369
|
+
import type {PluginsInjections} from "nuxt-i18n-micro";
|
|
370
|
+
|
|
371
|
+
declare module 'vue/types/vue' {
|
|
372
|
+
interface Vue extends PluginsInjections { }
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare module '@nuxt/types' {
|
|
376
|
+
interface NuxtAppOptions extends PluginsInjections { }
|
|
377
|
+
interface Context extends PluginsInjections { }
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
declare module '#app' {
|
|
381
|
+
interface NuxtApp extends PluginsInjections { }
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export {}`;
|
|
385
|
+
}
|
|
367
386
|
const module = defineNuxtModule({
|
|
368
387
|
meta: {
|
|
369
388
|
name: "nuxt-i18n-micro",
|
|
@@ -375,6 +394,7 @@ const module = defineNuxtModule({
|
|
|
375
394
|
meta: true,
|
|
376
395
|
debug: false,
|
|
377
396
|
define: true,
|
|
397
|
+
types: true,
|
|
378
398
|
defaultLocale: "en",
|
|
379
399
|
translationDir: "locales",
|
|
380
400
|
autoDetectPath: "*",
|
|
@@ -479,6 +499,12 @@ const module = defineNuxtModule({
|
|
|
479
499
|
pathPrefix: false,
|
|
480
500
|
extensions: ["vue"]
|
|
481
501
|
});
|
|
502
|
+
if (options.types) {
|
|
503
|
+
addTypeTemplate({
|
|
504
|
+
filename: "types/i18n-plugin.d.ts",
|
|
505
|
+
getContents: () => generateI18nTypes()
|
|
506
|
+
});
|
|
507
|
+
}
|
|
482
508
|
extendPages((pages) => {
|
|
483
509
|
const pagesNames = pages.map((page) => page.name).filter((name) => name !== void 0 && (!options.routesLocaleLinks || !options.routesLocaleLinks[name]));
|
|
484
510
|
if (!options.disableWatcher) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-i18n-micro",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.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",
|