This one seems tricker because the recommended code pattern is var binding = require('node-gyp-build')(__dirname)
Would need to potentially replace the path in the AST or otherwise support dynamic imports then add dedicated support for it or rewrite to use the bindings resolver in linker.js
For now its much simpler to just patch the module and replace the entrypoint with bindings module, but would be nice to get support for this loader.
This one seems tricker because the recommended code pattern is
var binding = require('node-gyp-build')(__dirname)Would need to potentially replace the path in the AST or otherwise support dynamic imports then add dedicated support for it or rewrite to use the bindings resolver in
linker.jsFor now its much simpler to just patch the module and replace the entrypoint with
bindingsmodule, but would be nice to get support for this loader.