-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect .node module require #3294
Comments
You explicitly told esbuild to do this when you passed |
omg, I'm blind :) thanks, I just need to use 'copy' mode |
I'm closing this issue because this is not a bug. You told esbuild to embed the path to the file in the bundle as a string, so that's what it did. You don't have to do that. There are other loaders for other things. For example, you can use the But you should probably just exclude the relevant package for the bundle entirely because many packages with native |
Hi guys!
Either here is a bug with .node modules requiring or I can't understand what is wrong with my script.
Here is a repo with bug reproduction
How to reproduce:
Expected behavior - requires content of .node module, then uses it as a module.
Current behavior - it seems like after build it tries to use PATH to module instead of it's content. Please see the screenshots, if I add 'require(..)' it starts work right.
The text was updated successfully, but these errors were encountered: