github nuxt-modules/i18n v10.6.0

12 hours ago

This release is mostly about performance, and about making the domain features behave consistently.

Faster builds and faster SSR

Locale messages are no longer bundled into your server build as JavaScript, no longer shipped as client chunks when they are served from the messages endpoint, and no longer copied on every server-rendered request.

Building a Nuxt app with 10 locales of around 2,000 messages each and 10 pages:

10.5.0 10.6.0
build time 9.2s 5.7s 38% faster
peak build memory 3.6 GB 2.5 GB 30% less
build output added by the module 12.9 MB 3.2 MB 75% smaller
SSR throughput 785 req/s 1722 req/s 2.2× higher

Median of three runs on an M4 Pro with Nuxt 4.5; throughput over 10 concurrent connections. The same app without the module builds in 3.4s and outputs 3.2 MB.

How much of this you notice depends on how many messages your app loads: a few locales with a few hundred messages each will barely differ, larger message sets gain the most. It covers messages the module can read while building — .json, .yaml and .json5 files. Locale files written as .ts or .js produce their messages at runtime, so both their build and their SSR cost stay as they were. Apps that previously ran out of memory building large message sets should now complete.

This should work without any changes on your side. The new message handling can be turned off with experimental.optimizeMessageBundling: false if you run into trouble — and if you do, please let us know so we can sort it out.

Domains

differentDomains and multiDomainLocales now agree on which locale each domain serves, which URL a locale is advertised on, and where a visitor goes when the locale they asked for lives on another domain. hreflang and canonical links name one domain per locale, so every domain in your setup describes the same set of pages instead of each claiming the languages for itself.

10.5.0 could also stop serving a locale at its own domain root, redirecting / to the prefixed path and returning 404 for unprefixed paths. A domain that serves exactly one locale is treated as that locale's default again, so domainDefault is not needed for it.

Changelog

   🚀 Features

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

Don't miss a new i18n release

NewReleases is sending notifications on new releases.