diff --git a/.changeset/fair-bottles-itch.md b/.changeset/fair-bottles-itch.md new file mode 100644 index 0000000..0f8f9d5 --- /dev/null +++ b/.changeset/fair-bottles-itch.md @@ -0,0 +1,5 @@ +--- +'@vintl/nuxt': patch +--- + +Switched to a slightly more compatible `#app` augmentation diff --git a/packages/vintl-nuxt/src/runtime/plugin.ts b/packages/vintl-nuxt/src/runtime/plugin.ts index fa655c7..9ab3916 100644 --- a/packages/vintl-nuxt/src/runtime/plugin.ts +++ b/packages/vintl-nuxt/src/runtime/plugin.ts @@ -163,7 +163,7 @@ type EventContext = { controller: IntlController } -declare module 'nuxt/app' { +declare module '#app' { interface NuxtApp extends InjectedProperties {} diff --git a/packages/vintl-nuxt/stubs/app.d.ts b/packages/vintl-nuxt/stubs/app.d.ts new file mode 100644 index 0000000..730948e --- /dev/null +++ b/packages/vintl-nuxt/stubs/app.d.ts @@ -0,0 +1 @@ +export * from 'nuxt/app' diff --git a/packages/vintl-nuxt/tsconfig.runtime.json b/packages/vintl-nuxt/tsconfig.runtime.json index ab90f14..a96942b 100644 --- a/packages/vintl-nuxt/tsconfig.runtime.json +++ b/packages/vintl-nuxt/tsconfig.runtime.json @@ -10,7 +10,8 @@ "outDir": "./dist", "paths": { - "#imports": ["./stubs/imports.js"] + "#imports": ["./stubs/imports.js"], + "#app": ["./stubs/app.js"] } }, "include": [