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

@i18n-micro/vitepress

v1.1.1

Published

VitePress bindings for i18n-micro — runtime dictionaries, MD components, and locale switcher.

Readme

@i18n-micro/vitepress

VitePress bindings for i18n-micro. One runtime API: createI18n — translations, path helpers, and (in the theme) Vue plugin + route sync.

Entries

| Import | Role | | ------------------------------ | ----------------------------------------------------- | | @i18n-micro/vitepress | Client createI18n + useI18n / getLocaleFromPath | | @i18n-micro/vitepress/theme | defineI18nTheme (uses virtual modules from config) | | @i18n-micro/vitepress/config | withI18n, buildVitePressLocales, SEO head | | @i18n-micro/vitepress/node | Node createI18n (@i18n-micro/node + path methods) |

OpenAPI-style locks: tests/integration-openapi.test.ts.
Playground SSG smoke (en/fr/de, page-scoped, SEO / disableMeta): tests/playground-ssg.test.ts.

There is no separate createVitePressRouterAdapter / path-helpers package surface — path methods hang on the createI18n instance via BaseI18n.extend.

createI18n

Theme / client

import { createI18n } from '@i18n-micro/vitepress'

const i18n = createI18n({
  locale: 'en',
  defaultLocale: 'en',
  locales: [{ code: 'en' }, { code: 'fr' }],
  messages: { en: { hi: 'Hi' }, fr: { hi: 'Salut' } },
})

i18n.localizePath('/guide', 'fr') // '/fr/guide'
i18n.t // via i18n.global / after enhanceApp
// app.use(i18n) happens inside i18n.enhanceApp({ app, router })

Prefer defineI18nTheme for zero-boilerplate sites.

Node / generators

Built on @i18n-micro/node (same createI18n / loadTranslations as Astro & CLI), plus VitePress path methods on the same object:

import { createI18n } from '@i18n-micro/vitepress/node'

const i18n = createI18n({
  locale: 'en',
  fallbackLocale: 'en',
  translationDir: './locales',
  locales: ['en', 'fr'],
  defaultLocale: 'en',
})
await i18n.loadTranslations()
i18n.t('cta.readMore')
i18n.localizePath('/guide', 'fr')

You can also import createI18n from @i18n-micro/node directly when you do not need path helpers.

Custom methods anywhere BaseI18n is used:

i18n.extend({ shout: (key) => String(i18n.t(key)).toUpperCase() })

Config

import { defineConfig } from 'vitepress'
import { withI18n, buildVitePressLocales } from '@i18n-micro/vitepress/config'

const locales = [
  { code: 'en', iso: 'en-US', displayName: 'English', og: 'en_US' },
  { code: 'fr', iso: 'fr-FR', displayName: 'Français', og: 'fr_FR' },
]
const defaultLocale = 'en'

export default defineConfig(
  withI18n(
    { locales: buildVitePressLocales(locales, defaultLocale) },
    {
      locale: defaultLocale,
      defaultLocale,
      locales,
      translationDir: 'locales',
      metaBaseUrl: 'https://example.com',
    },
  ),
)

withI18n injects themeConfig.i18nRouting automatically.

Theme

import DefaultTheme from 'vitepress/theme'
import { defineI18nTheme } from '@i18n-micro/vitepress/theme'

export default defineI18nTheme(DefaultTheme)

In pages: useI18n().localePath / switchLocale, or $t / <I18nT>.

License

MIT