# Is element-plus ESM-only? Can you require() it?

> element-plus@2.14.5 ships CommonJS and ESM builds. Dual package — require() works on Node.js 20, 22, 24 and 26, fails on 18; import works too.

A Component Library for Vue 3

Last verified Sep 9, 2026 against element-plus@2.14.5.

element-plus publishes both a CommonJS entry and a native ESM entry (ESM added in 2.0.0). require("element-plus") works on Node.js 20, 22, 24 and 26 but fails on Node.js 18 (ERR_REQUIRE_ESM). import "element-plus" works alongside it.

## What to do

1. Nothing to change. require("element-plus") works on Node.js 20, 22, 24 and 26 but fails on Node.js 18 (ERR_REQUIRE_ESM). import * as elementPlus from "element-plus" works alongside it; use named imports for what the ESM entry exports.
2. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 2.14.5 (Aug 21, 2026)
- Module format: Dual (CommonJS + ESM)
- Last CommonJS version: 2.14.5
- Native ESM since: 2.0.0
- TypeScript types: bundled
- Node engines: not declared
- Weekly downloads: 618K
- License: MIT

## Runtime test results for element-plus@2.14.5

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

| Runtime | require("element-plus") | import "element-plus" |
|---|---|---|
| Node.js 18 | fails (ERR_REQUIRE_ESM) | 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 element-plus

ES modules:

```js
import * as elementPlus from "element-plus";
```

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

CommonJS:

```js
const elementPlus = require("element-plus");
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (148 versions; the newest 60 shown).

| Versions | Format | First published |
|---|---|---|
| 2.7.2 – 2.14.5 | Dual (CommonJS + ESM) | Apr 26, 2024 |

## Frequently asked

**Is element-plus ESM-only?**

element-plus@2.14.5 ships CommonJS and ESM builds. element-plus publishes both a CommonJS entry and a native ESM entry (ESM added in 2.0.0). require("element-plus") works on Node.js 20, 22, 24 and 26 but fails on Node.js 18 (ERR_REQUIRE_ESM). import "element-plus" works alongside it.

**Can I require element-plus?**

Yes. element-plus ships a CommonJS entry alongside the native ESM entry. require("element-plus") works on Node.js 20, 22, 24 and 26 but fails on Node.js 18 (ERR_REQUIRE_ESM).

**Does element-plus work in Bun?**

Yes. import "element-plus" loaded successfully in Bun 1.4.0 on Sep 9, 2026.

**Does element-plus ship TypeScript types?**

Yes. element-plus bundles its own type declarations; no @types package is needed.

## Links

- [element-plus on npm](https://www.npmjs.com/package/element-plus)
- [Source repository](https://github.com/element-plus/element-plus)
- [HTML version](https://canirequire.com/package/element-plus/)
- [JSON version](https://canirequire.com/package/element-plus.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
