This release is mostly fixes, along with support for Nuxt 5 and a change in which vue-i18n your app is built with.
Nuxt 5
The server side of the module now runs on Nuxt 5 without the Nitro 2 compatibility layer, while Nuxt 4 keeps working as before (#4166). It still requires Nitro, the experimental Vite server builder is not supported yet.
Your own vue-i18n
If your project installs vue-i18n itself, that copy is now the one your app is built with, together with the @intlify packages it depends on (#4183). Projects that don't install it get the version that comes with the module.
🚀 Features
- Support nuxt 5 server runtime - by @danielroe and @onmax in #4166 (89c0c)
- Export NuxtLinkLocale prop and slot types from #i18n - by @corthx and @BobbieGoede in #4203 (ffed2)
🐞 Bug Fixes
- Transform export error in dev mode - by @BobbieGoede in #4123 (3ab46)
- Resolve intlify dependencies relative to the module - by @danielroe in #4126 (ccee5)
- Narrow logger type to methods used - by @danielroe in #4147 (c5e1e)
- Load messages through loaders in client-only apps with component islands - by @BobbieGoede in #4191 (f8097)
- Use plugin Nuxt app during SSR setup - by @iruoy in #4159 (3614a)
- Fetch messages with
useRequestFetchto support nuxt versions before 4.5 - by @BobbieGoede in #4192 (cfc3d) - Use the plugin Nuxt app for the router and request event - by @BobbieGoede in #4193 (3ef76)
- Only warn about missing
baseUrlwhen seo links are generated - by @dax-side in #4186 (eebc7) - Remove redundant message copy with
experimental.preload- by @raminjafary in #4153 (38422) - Keep nested custom paths intact with
trailingSlash- by @BobbieGoede in #4197 (968a5) - Unwrap the default export of locale files in the generated loaders - by @BobbieGoede in #4199 (ee42d)
- Keep a vue-i18n config needing the Nuxt app out of the nitro bundle - by @BobbieGoede and lazerg in #4201 (af599)
- Register server hooks before clearing the handler cache - by @Ice-Hazymoon and @BobbieGoede in #4181 (af480)
- Bypass the nitro cache for messages when the message cache is disabled - by @BobbieGoede in #4207 (b8cc1)
- Keep messages requests with another build's hash out of the cache (CWE-770) - by @Vincentdevreede and @BobbieGoede in #4118 (c23ab)
- Resolve aliases in page file paths - by @mansurkhoja and @BobbieGoede in #4170 (89912)
- Resolve
vue-i18nfrom the app and intlify deps fromvue-i18n- by @209, Claude Opus 5.5, Ilya Kolevatykh and @BobbieGoede in #4183 (ebd2d) - compactRoutes: Prefix absolute child paths and aliases with the locale pattern - by @leochiu-a in #4205 (f529f)
- domain: Resolve the domain default from domains set through runtime config - by @BobbieGoede in #4196 (ff096)
- head: Only re-apply i18n params to the route they belong to - by @jansalwowski and @BobbieGoede in #4132 (9185d)
- pages: Localize nested routes only for their parent's locale - by @Vincentdevreede and @BobbieGoede in #4131 (31576)
- routing: Build per-host route tables instead of mutating the router - by @danielroe and @BobbieGoede in #4184 (1c0e3)
- types: Type the
i18nconfig key throughModuleOptions- by @BobbieGoede in #4198 (a3f33) - vite: Load YAML messages in server environments - by @onmax in #4127 (6a725)
🏎 Performance
- Set up the i18n server context on first use - by @onmax and @BobbieGoede in #4174 (542a0)