canirequire › Dual (CommonJS + ESM) › baseline-browser-mapping
Is baseline-browser-mapping ESM-only? Can you require() it?
A library for obtaining browser versions with their maximum supported Baseline feature set and Widely Available status.
Last verified Sep 9, 2026 against baseline-browser-mapping@2.11.21. JSON
Dual (CommonJS + ESM) Dual package — both require() and import work
baseline-browser-mapping publishes both a CommonJS entry and a native ESM entry (ESM added in 0.1.0). require("baseline-browser-mapping") and import "baseline-browser-mapping" both work on every supported Node.js version and in Bun.
Does baseline-browser-mapping@2.11.21 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("baseline-browser-mapping") from a CommonJS file and import "baseline-browser-mapping" from an ES module.
| Runtime | require("baseline-browser-mapping") | import "baseline-browser-mapping" |
|---|---|---|
| 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 | ✓ works | ✓ works |
How to import baseline-browser-mapping
ES modules (import)
import baselineBrowserMapping from "baseline-browser-mapping";CommonJS (require)
const baselineBrowserMapping = require("baseline-browser-mapping");Module format by version
Derived from the type, main and exports fields of every stable release on npm (156 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 2.9.18 – 2.11.21 | Dual (CommonJS + ESM) | Jan 24, 2026 |
Frequently asked
Is baseline-browser-mapping ESM-only?
baseline-browser-mapping@2.11.21 ships CommonJS and ESM builds. baseline-browser-mapping publishes both a CommonJS entry and a native ESM entry (ESM added in 0.1.0). require("baseline-browser-mapping") and import "baseline-browser-mapping" both work on every supported Node.js version and in Bun.
Can I require baseline-browser-mapping?
Yes. baseline-browser-mapping ships a CommonJS entry, so require("baseline-browser-mapping") works on every Node.js version, alongside the native ESM entry for import.
Does baseline-browser-mapping work in Bun?
Yes. import "baseline-browser-mapping" loaded successfully in Bun 1.4 on Sep 9, 2026.
Does baseline-browser-mapping ship TypeScript types?
Yes. baseline-browser-mapping 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
- buffer 6.0.3CommonJS
- punycode 2.3.1CommonJS
- lodash 4.18.1CommonJS
- object-inspect 1.13.4CommonJS
- universalify 2.0.1CommonJS
- react-dom 19.2.8CommonJS
- eslint-scope 9.1.2Dual
- micromatch 4.0.8CommonJS