-
Notifications
You must be signed in to change notification settings - Fork 522
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
Eliminate/reduce custom require() shim #315
Comments
We now turn on I think pubref/rules_node requires your nodejs_binary to be handed a single tree that does indeed work with native module resolution and uses |
We now have the The new We'll use this tracking bug to port more rules to use the linker and make the custom require logic guarded by a flag, which will eventually have its default flipped and later removed. |
update here: any rules loaded from generated |
This issue was automatically closed because it went two weeks without a reply since it was labeled "Can Close?" |
#2125 is the current issue for this - the patched module resolver should be opt-in |
The current approach works by shimming require().
This is fragile, it's unclear if it even works with ES2015 modules (#228).
Is there a reason that rules_nodejs needs to inject runtime code for modern Node.js (6.3+).
NODE_PATH
and--preserve-symlinks
(along with perhaps--preserve-symlinks-main
) satisfies?I believe Bazel's runfiles can be made compatible with native Node.js module resolution.
The text was updated successfully, but these errors were encountered: