Detect Bundler Environment

JSON →
library 1.1.0 ·javascript
verified May 27, 2026

The `detect-bundler` package provides build-time flags to identify if the current code is being bundled for a web browser (e.g., via Webpack, Browserify) or for React Native (via Metro). Unlike runtime environment detection, this library leverages the `package.json` `browser` field specification to resolve platform-specific code paths during the build process, ensuring zero runtime overhead. Its current stable version is 1.1.0. Given its focused utility, new releases are infrequent and primarily address minor updates or compatibility fixes rather than new features. This design choice makes it particularly useful for libraries or applications needing to conditionally include platform-specific logic without impacting runtime performance, differentiating it from solutions that rely on `navigator` or `process` checks.

total hits 21
actors 7 distinct systems
last hit 7d ago MetaBot
ByteDance
8
MetaBot
5
GPTBot
2
Script
1
Search engines
2

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇩🇪 Germany