JSPM

detect-bundler

1.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 101
    • Score
      100M100P100Q92115F
    • License MIT

    Detects browser and React Native source-code bundlers

    Package Exports

    • detect-bundler
    • detect-bundler/browser.js
    • detect-bundler/main.js
    • detect-bundler/react-native.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (detect-bundler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    detect-bundler

    This library exports two simple flags:

    • isBrowser - True if a tool like Webpack or Browserify is bundling this project for the web.
    • isReactNative- True if the React Native is bundling this project.

    This library uses the package.json browser field to select which flags to export. This means that everything happens at build time; there is no run-time platform detection.