canirequire

canirequire › Dual (CommonJS + ESM) › vue-i18n

Is vue-i18n ESM-only? Can you require() it?

Internationalization plugin for Vue.js

Last verified Sep 9, 2026 against vue-i18n@11.4.10. Markdown · JSON

Dual (CommonJS + ESM) Dual package — require() works on every Node.js version we test; import works too

vue-i18n publishes both a CommonJS entry and a native ESM entry (ESM added in 9.2.0). require("vue-i18n") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >= 22. import "vue-i18n" works alongside it.

What to do

  1. Nothing to change. require("vue-i18n") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >= 22. import * as vueI18n from "vue-i18n" works alongside it; use named imports for what the ESM entry exports.
  2. TypeScript: types are bundled; install nothing extra.
Latest
11.4.10 (Aug 25, 2026)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
11.4.10
Native ESM since
9.2.0
TypeScript types
Bundled
Node engines
>= 22
Weekly downloads
3.4M
License
MIT

Does vue-i18n@11.4.10 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("vue-i18n") from a CommonJS file and import "vue-i18n" from an ES module.

Runtimerequire("vue-i18n")import "vue-i18n"
Node.js 18✓ works✓ works
Node.js 20✓ works✓ works
Node.js 22✓ works✓ works
Node.js 24✓ works✓ works
Node.js 26✓ works✓ works
Bun 1.4.0✓ works✓ works

How to import vue-i18n

ES modules (import)

import * as vueI18n from "vue-i18n";

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS (require)

const vueI18n = require("vue-i18n");

Module format by version

Derived from the type, main and exports fields of every stable release on npm, corrected where a runtime test of that version contradicted them (240 versions; the newest 60 shown).

VersionsFormatFirst published
9.9.0 – 11.4.10Dual (CommonJS + ESM)Jan 6, 2024

Frequently asked

Is vue-i18n ESM-only?

vue-i18n@11.4.10 ships CommonJS and ESM builds. vue-i18n publishes both a CommonJS entry and a native ESM entry (ESM added in 9.2.0). require("vue-i18n") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >= 22. import "vue-i18n" works alongside it.

Can I require vue-i18n?

Yes. vue-i18n ships a CommonJS entry alongside the native ESM entry. require("vue-i18n") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. The package declares Node.js >= 22.

Does vue-i18n work in Bun?

Yes. import "vue-i18n" loaded successfully in Bun 1.4.0 on Sep 9, 2026.

Does vue-i18n ship TypeScript types?

Yes. vue-i18n bundles its own type declarations; no @types package is needed.

Links

Other dual (commonjs + esm) packages

Similar popularity