canirequire

canirequireDual (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. JSON

Dual (CommonJS + ESM) Dual package — both require() and import work

vue-i18n publishes both a CommonJS entry and a native ESM entry (ESM added in 9.2.0). require("vue-i18n") and import "vue-i18n" both work on every supported Node.js version and in Bun.

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✓ works✓ works

How to import vue-i18n

ES modules (import)

import vueI18n from "vue-i18n";

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 (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") and import "vue-i18n" both work on every supported Node.js version and in Bun.

Can I require vue-i18n?

Yes. vue-i18n ships a CommonJS entry, so require("vue-i18n") works on every Node.js version, alongside the native ESM entry for import.

Does vue-i18n work in Bun?

Yes. import "vue-i18n" loaded successfully in Bun 1.4 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