bundle-bindings

A `bindings` replacement for when JS files have been bundled together into a single file.

Usage no npm install needed!

<script type="module">
  import bundleBindings from 'https://cdn.skypack.dev/bundle-bindings';
</script>

README

bundle-bindings

A drop-in replacement for bindings in bundled modules (e.g. ones that have been browserified). bindings has issues finding the module root in such cases (since all modules are in one file, its stack trace search doesn't work). This module avoids this issue by not attempting to traverse the tree at all, and instead looking directly in the current directory.

You probably don't need this, unless you're doing weird stuff.

NPM

NPM

Usage

Insert in the package.json of the module you wish to bundle as a browser replacement.

e.g.

{
// ...
  "browser": {
    "bindings": "bundle-bindings"
  }
// ...
}

Installation

npm install bundle-bindings

License

MIT