# Is ant-design-vue ESM-only? Can you require() it?

> ant-design-vue@4.2.6 is a CommonJS package. CommonJS — require() works on every Node.js version we test.

An enterprise-class UI design language and Vue-based implementation

Latest version 4.2.6, published Nov 11, 2024.

ant-design-vue ships CommonJS only. require("ant-design-vue") should work on every Node.js version the package supports (>=12.22.0); the runtime probe has not run for this version. import "ant-design-vue" 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("ant-design-vue") should work on every Node.js version the package supports (>=12.22.0); the runtime probe has not run for this version.
2. From ES modules use the default import: import antDesignVue from "ant-design-vue"; then destructure. Named imports only work when Node.js can statically detect the exports.
3. TypeScript: types are bundled; install nothing extra.

## Facts

- Latest: 4.2.6 (Nov 11, 2024)
- Module format: CommonJS
- Last CommonJS version: 4.2.6
- TypeScript types: bundled
- Node engines: >=12.22.0
- Weekly downloads: 168K
- License: MIT

## Runtime test results for ant-design-vue@4.2.6

Runtime probe pending for this version (install failed: PROBE_TIMEOUT). The facts above come from package.json.

## How to import ant-design-vue

ES modules:

```js
import antDesignVue from "ant-design-vue";
```

CommonJS:

```js
const antDesignVue = require("ant-design-vue");
```

## Module format by version

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

| Versions | Format | First published |
|---|---|---|
| 2.0.0 – 4.2.6 | CommonJS | Feb 6, 2021 |

## Frequently asked

**Is ant-design-vue ESM-only?**

ant-design-vue@4.2.6 is a CommonJS package. ant-design-vue ships CommonJS only. require("ant-design-vue") should work on every Node.js version the package supports (>=12.22.0); the runtime probe has not run for this version. import "ant-design-vue" 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 ant-design-vue with ES module syntax?**

Yes. import antDesignVue from "ant-design-vue" 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 ant-design-vue ship TypeScript types?**

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

## Links

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