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. 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.
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.
| Runtime | require("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).
| Versions | Format | First published |
|---|---|---|
| 9.9.0 – 11.4.10 | Dual (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
- minimatch 10.2.6Dual
- brace-expansion 5.0.9Dual
- lru-cache 11.5.2Dual
- glob 13.0.6Dual
- eslint-visitor-keys 5.0.1Dual
- yallist 5.0.0Dual
- balanced-match 4.0.4Dual
- js-yaml 5.4.1Dual
Similar popularity
- pug 3.0.4CommonJS
- webpack-manifest-plugin 6.0.1ESM-only
- rollup-plugin-terser 7.0.2Dual
- ethers 6.17.0Dual
- should 13.2.3CommonJS
- eslint-webpack-plugin 6.0.0CommonJS
- mobx 7.0.3Dual
- eslint-config-react-app 7.0.1CommonJS