canirequire › Dual (CommonJS + ESM) › @ant-design/web3-common
Is @ant-design/web3-common ESM-only? Can you require() it?
[https://web3.ant.design](https://web3.ant.design)
Latest version 1.23.0, published Dec 26, 2025. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@ant-design/web3-common publishes both a CommonJS entry and a native ESM entry (ESM added in 0.1.0). require("@ant-design/web3-common") and import "@ant-design/web3-common" both work on every supported Node.js version and in Bun.
Does @ant-design/web3-common@1.23.0 actually load? Runtime test results
Runtime probe pending for this version. The values below are what package.json declares; they are refreshed once the probe runs.
| Runtime | require("@ant-design/web3-common") | import "@ant-design/web3-common" |
|---|---|---|
| Node.js 18 | ✓ expected | ✓ expected |
| Node.js 20 | ✓ expected | ✓ expected |
| Node.js 22 | ✓ expected | ✓ expected |
| Node.js 24 | ✓ expected | ✓ expected |
| Node.js 26 | ✓ expected | ✓ expected |
| Bun 1.4 | pending | pending |
Install failed in our sandbox: error: ConnectionRefused downloading package manifest antd The rows above show what package.json declares.
How to import @ant-design/web3-common
ES modules (import)
import web3Common from "@ant-design/web3-common";CommonJS (require)
const web3Common = require("@ant-design/web3-common");Module format by version
Derived from the type, main and exports fields of every stable release on npm (37 versions; the newest 37 shown).
| Versions | Format | First published |
|---|---|---|
| 2.0.0 | CommonJS | Dec 29, 2023 |
| 1.3.2 – 1.23.0 | Dual (CommonJS + ESM) | Jan 16, 2024 |
| 1.1.0 – 1.3.1 | CommonJS | Dec 29, 2023 |
| 0.1.0 – 1.0.0 | Dual (CommonJS + ESM) | Dec 11, 2023 |
Frequently asked
Is @ant-design/web3-common ESM-only?
@ant-design/web3-common@1.23.0 ships CommonJS and ESM builds. @ant-design/web3-common publishes both a CommonJS entry and a native ESM entry (ESM added in 0.1.0). require("@ant-design/web3-common") and import "@ant-design/web3-common" both work on every supported Node.js version and in Bun.
Can I require @ant-design/web3-common?
Yes. @ant-design/web3-common ships a CommonJS entry, so require("@ant-design/web3-common") works on every Node.js version, alongside the native ESM entry for import.
Does @ant-design/web3-common ship TypeScript types?
Yes. @ant-design/web3-common 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
- @storybook/preset-create-react-app 10.6.0ESM-only
- @rollup/plugin-url 8.0.2Dual
- @webcomponents/webcomponentsjs 2.8.0CommonJS
- @size-limit/preset-small-lib 13.0.3ESM-only
- @ant-design/web3-icons 1.16.0Dual
- @alifd/next 1.27.34CommonJS
- @angular/http 7.2.16CommonJS
- @alifd/babel-preset-next 2.0.0-betaCommonJS