canirequire

canirequireDual (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.

Latest
2.11.21 (Sep 3, 2026)
Module format
Dual (CommonJS + ESM)
Last CommonJS version
2.11.21
Native ESM since
0.1.0
TypeScript types
Bundled
Node engines
>=6.0.0
Weekly downloads
145.8M
License
Apache-2.0

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.

Runtimerequire("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).

VersionsFormatFirst published
2.9.18 – 2.11.21Dual (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

Similar popularity