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

> antd@6.6.3 is a CommonJS package. CommonJS — require() works on every Node.js version we test.

An enterprise-class UI design language and React components implementation

Last verified Sep 9, 2026 against antd@6.6.3.

antd ships CommonJS only. require("antd") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "antd" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

It also declares a "module" field, so bundlers such as webpack, Vite and esbuild pick up an ESM build for tree-shaking.

## What to do

1. require("antd") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun.
2. From ES modules use the default import: import antd from "antd"; then destructure. Named imports only work when Node.js can statically detect the exports.
3. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 6.6.3 (Sep 7, 2026)
- Module format: CommonJS
- Last CommonJS version: 6.6.3
- Native ESM since: 6.4.0
- TypeScript types: bundled
- Node engines: not declared
- Weekly downloads: 3.2M
- License: MIT

## Runtime test results for antd@6.6.3

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

| Runtime | require("antd") | import "antd" |
|---|---|---|
| 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 antd

ES modules:

```js
import antd from "antd";
```

CommonJS:

```js
const antd = require("antd");
```

## Module format by version

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

| Versions | Format | First published |
|---|---|---|
| 6.4.1 – 6.6.3 | CommonJS | May 14, 2026 |
| 6.4.0 | Dual (CommonJS + ESM) | May 14, 2026 |
| 5.25.0 – 6.3.7 | CommonJS | May 7, 2025 |

## Frequently asked

**Is antd ESM-only?**

antd@6.6.3 is a CommonJS package. antd ships CommonJS only. require("antd") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "antd" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

**Can I import antd with ES module syntax?**

Yes. import antd from "antd" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.

**Does antd work in Bun?**

Yes. import "antd" loaded successfully in Bun 1.4.0 on Sep 9, 2026.

**Does antd ship TypeScript types?**

Yes. antd bundles its own type declarations; no @types package is needed.

## Links

- [antd on npm](https://www.npmjs.com/package/antd)
- [Source repository](https://github.com/ant-design/ant-design)
- [HTML version](https://canirequire.com/package/antd/)
- [JSON version](https://canirequire.com/package/antd.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.
