A micro-package (v1.0.0, no active releases since 2019) that detects at runtime whether the current module was bundled by webpack. It works by checking for the presence of a `__webpack_require__` function in the global scope. This is a simple, single-purpose utility with no dependencies. For similar detection in other bundlers (e.g., Rollup, Parcel), alternative approaches are needed. The package is published as a CommonJS module only, with no TypeScript type definitions.
npm install is-webpack-bundleVerified import paths — ran on the pinned version, not inferred.
Shows how to check if code is webpack-bundled and conditionally handle logic.
Verify the check works in your specific webpack setup; consider alternative detection methods.
Use a bundler-agnostic detection library or check for other globals.
Use require() or configure your bundler to handle CJS interop.
Run npm install is-webpack-bundle
This error should not happen because the package catches the ReferenceError internally; if it does, ensure you are not modifying global scope or using eval.
Use require() or set "type": "module" in package.json and ensure the import path is valid.
No dependency data recorded yet.