npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nuxt-i18n-micro

v3.6.0

Published

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.

Downloads

15,263

Readme

npm version npm downloads License Donate

Nuxt I18n Micro

Nuxt I18n Micro is a fast, simple, and lightweight internationalization (i18n) module for Nuxt. Despite its compact size, it's designed with large projects in mind, offering significant performance improvements over traditional i18n solutions like nuxt-i18n. The module was built from the ground up to be highly efficient, focusing on minimizing build times, reducing server load, and shrinking bundle sizes.

Why Nuxt I18n Micro?

The Nuxt I18n Micro module was created to address critical performance issues found in the original nuxt-i18n module, particularly in high-traffic environments and projects with large translation files. Key issues with nuxt-i18n include:

  • High Memory Consumption: Consumes significant memory during both build and runtime, leading to performance bottlenecks.
  • Slow Performance: Especially with large translation files, it causes noticeable slowdowns in build times and server response.
  • Large Bundle Size: Generates a large bundle, negatively impacting application performance.
  • Memory Leaks and Bugs: Known for memory leaks and unpredictable behavior under heavy load.

Performance Comparison

To showcase the efficiency of Nuxt I18n Micro, we conducted tests under identical conditions. Both modules were tested with a 10MB translation file on the same hardware. We also include a plain-nuxt baseline (no i18n module) to measure the real overhead.

Build Time and Resource Consumption

Note: The plain-nuxt baseline is a minimal implementation created solely for benchmarking purposes. It loads data directly from JSON files without any i18n logic. Real-world applications will have more complexity and higher resource usage.

| Project | Build Time | Code Bundle | Max Memory | Max CPU | |---------|------------|-------------|------------|---------| | plain-nuxt (baseline) | 5.71s | 1.35 MB | 674 MB | 240% | | i18n-micro | 23.47s | 1.5 MB | 1,658 MB | 208% | | i18n v10 | 84.91s | 19.24 MB | 9,528 MB | 439% |

Code Bundle = JavaScript/CSS code only (excludes translation JSON files). i18n-micro stores translations as lazy-loaded JSON files, keeping the code bundle minimal.

  • i18n-micro vs baseline: +17.76s build, +0.15 MB code, +984 MB memory
  • i18n v10 vs baseline: +79.20s build, +17.89 MB code, +8,854 MB memory

Stress Test Results (Requests per Second)

| Project | Avg Response | RPS (Artillery) | Max Memory | |---------|--------------|-----------------|------------| | plain-nuxt | 544 ms | 228 | 340 MB | | i18n-micro | 411 ms | 292 | 347 MB | | i18n v10 | 1,363 ms | 51 | 1,243 MB |

Comparison: i18n v10 vs i18n-micro

  • Code Bundle: 17.74 MB smaller (i18n-micro: 1.5 MB vs i18n v10: 19.24 MB)
  • Build Time: 61.44s faster (i18n-micro: 23.47s vs i18n v10: 84.91s)
  • Max Memory (build): 7,870 MB less (i18n-micro: 1,658 MB vs i18n v10: 9,528 MB)
  • Average Response Time: 952 ms faster (i18n-micro: 411 ms vs i18n v10: 1,363 ms)
  • Requests Per Second: 241 more (i18n-micro: 292 vs i18n v10: 51)

These results clearly demonstrate that Nuxt I18n Micro significantly outperforms the original module in every critical area while staying close to the plain Nuxt baseline.

Key Features

  • 🌐 Compact Yet Powerful: Despite its small size, Nuxt I18n Micro is designed for large-scale projects, focusing on performance and efficiency.
  • Optimized Build and Runtime: Reduces build times, memory usage, and server load, making it ideal for high-traffic applications.
  • 🛠 Minimalist Design: The module is structured around just 5 components (1 module and 4 plugins), making it easy to understand, extend, and maintain.
  • 📏 Efficient Routing: Generates only 2 routes regardless of the number of locales, thanks to dynamic regex-based routing, unlike other i18n modules that generate separate routes for each locale.
  • 🗂 Streamlined Translation Loading: Only JSON files are supported, with translations split between a global file for common texts (e.g., menus) and page-specific files, which are auto-generated in the dev mode if not present.

Quick Setup

Install the module in your Nuxt application with:

npm install nuxt-i18n-micro

Then, add it to your nuxt.config.ts:

export default defineNuxtConfig({
  modules: [
    'nuxt-i18n-micro',
  ],
  i18n: {
    locales: [
      { code: 'en', iso: 'en-US', dir: 'ltr' },
      { code: 'fr', iso: 'fr-FR', dir: 'ltr' },
      { code: 'ar', iso: 'ar-SA', dir: 'rtl' },
    ],
    defaultLocale: 'en',
    translationDir: 'locales',
    meta: true,
  },
})

That's it! You're now ready to use Nuxt I18n Micro in your Nuxt app.

Star History

Star History Chart

Docs

Plugin Methods

Performance

Performance Test Results

Components

Layers

Seo

Migration

Contribution