canirequire › Dual (CommonJS + ESM) › @ant-design/web3-icons
Is @ant-design/web3-icons ESM-only? Can you require() it?
A collection of Web3 icons.
Last verified Sep 9, 2026 against @ant-design/web3-icons@1.16.0. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
@ant-design/web3-icons publishes both a CommonJS entry and a native ESM entry (ESM added in 0.1.0). require("@ant-design/web3-icons") and import "@ant-design/web3-icons" both work on every supported Node.js version and in Bun.
Does @ant-design/web3-icons@1.16.0 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("@ant-design/web3-icons") from a CommonJS file and import "@ant-design/web3-icons" from an ES module.
| Runtime | require("@ant-design/web3-icons") | import "@ant-design/web3-icons" |
|---|---|---|
| Node.js 18 | ✗ failsERR_REQUIRE_ESM | ✗ failsERR_MODULE_NOT_FOUND |
| Node.js 20 | ✗ failsMODULE_NOT_FOUND | ✗ failsERR_MODULE_NOT_FOUND |
| Node.js 22 | ✗ failsMODULE_NOT_FOUND | ✗ failsERR_MODULE_NOT_FOUND |
| Node.js 24 | ✗ failsMODULE_NOT_FOUND | ✗ failsERR_MODULE_NOT_FOUND |
| Node.js 26 | ✗ failsMODULE_NOT_FOUND | ✗ failsERR_MODULE_NOT_FOUND |
| Bun 1.4 | ✓ works | ✓ works |
A failing require() on a CommonJS package usually means the package needs a browser/DOM global, a peer dependency, or a native binary that is not available in a bare Node.js process.
How to import @ant-design/web3-icons
ES modules (import)
import web3Icons from "@ant-design/web3-icons";CommonJS (require)
const web3Icons = require("@ant-design/web3-icons");Module format by version
Derived from the type, main and exports fields of every stable release on npm (31 versions; the newest 31 shown).
| Versions | Format | First published |
|---|---|---|
| 2.0.0 | CommonJS | Dec 29, 2023 |
| 1.3.1 – 1.16.0 | Dual (CommonJS + ESM) | Jan 16, 2024 |
| 1.1.0 – 1.3.0 | CommonJS | Dec 29, 2023 |
| 0.1.0 – 1.0.0 | Dual (CommonJS + ESM) | Dec 11, 2023 |
Frequently asked
Is @ant-design/web3-icons ESM-only?
@ant-design/web3-icons@1.16.0 ships CommonJS and ESM builds. @ant-design/web3-icons publishes both a CommonJS entry and a native ESM entry (ESM added in 0.1.0). require("@ant-design/web3-icons") and import "@ant-design/web3-icons" both work on every supported Node.js version and in Bun.
Can I require @ant-design/web3-icons?
Yes. @ant-design/web3-icons ships a CommonJS entry, so require("@ant-design/web3-icons") works on every Node.js version, alongside the native ESM entry for import.
Does @ant-design/web3-icons work in Bun?
Yes. import "@ant-design/web3-icons" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does @ant-design/web3-icons ship TypeScript types?
Yes. @ant-design/web3-icons 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
- @rollup/plugin-url 8.0.2Dual
- @webcomponents/webcomponentsjs 2.8.0CommonJS
- @size-limit/preset-small-lib 13.0.3ESM-only
- @ant-design/web3-common 1.23.0Dual
- @alifd/next 1.27.34CommonJS
- @angular/http 7.2.16CommonJS
- @alifd/babel-preset-next 2.0.0-betaCommonJS
- @release-it/conventional-changelog 12.0.0ESM-only