This is almost doable. What is needed is:
- the
require must be dynamic on platform or arch
- node-pre-gyp needs to support templating the
module_path so that a developer can install multiple targets and each have them dropped in a predictable platform-dependent place.
Could lean on node_modules and require logic for handling this as mentioned in npm/npm#1891 (comment)