-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
hey there 👋
thanks for the super-helpful lib 🙏
i'm looking for a way to "vendor" the binding files for my app such that dependencies (e.g. @serialport/bindings) use the vendor'ed bindings files provided by the root app instead of their module-local default. i don't see a way to do this - am i just missing it?
very roughly, you could:
- determine the
app_root(perhaps via app-root-path) - determine
module_name(the package.jsonnamefield for the module - e.g.@serialport/bindings) - add a lookup entry to the list here which is resolved first and attempts to load from a path like:
['app_root', 'vendor', 'module_name', `abi-v${process.versions.modules}`, 'platform', 'arch', 'bindings']
...does that make sense and fit with your goals for this lib? happy to create a PR if so!
related: serialport/node-serialport#2044
giohappy
Metadata
Metadata
Assignees
Labels
No labels