node-loader icon indicating copy to clipboard operation
node-loader copied to clipboard

[Feature request] Handling node-gyp-build, node-pre-gyp, binding etc.

Open Rush opened this issue 3 years ago • 1 comments

Feature Proposal

Implement alternative modules to node-gyp-build, node-pre-gyp, binding - perhaps loadable as replacements via "resolve" that would help load appropriate .node file at build time.

Feature Use Case

Currently most native packages cannot be bundled due to code such as:

const binding = require('node-gyp-build')(path.join(__dirname, '..'));

and similar for other package like binding or node-pre-gyp

Rush avatar Jul 17 '22 22:07 Rush

I think we need a webpack plugin here to handle this case and use webpack's parser hooks

alexander-akait avatar Jul 18 '22 01:07 alexander-akait