[Bug]: `npm_package` is very slow for targets with a lot of dependencies
What happened?
For targets with a lot of upstream dependencies, npm_package becomes very slow, where a "Copying files to directory" step could take upwards of 30s even if the total amount of files being copied over was just in the dozens.
Workaround
Anyone encountering this in the future, the following settings for npm_package resolved this issue:
include_transitive_declarations = False,
include_runfiles = False,
Version
Development (host) and target OS/architectures: mac m2
Output of bazel --version:
Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
Language(s) and/or frameworks involved:
How to reproduce
Large monorepo with a target that has enough upstream dependencies such that the total depedency graph was 10k nodes+.
Any other information?
No response
I think the resolution is just to help people discover those two flags if they don't mean to include those files in the package?
Yep! Also I was told to make an issue just to keep track as this will be fixed in the next version of rules_js
I think this may no longer be relevant?
The latest docs do not mention include_transitive_declarations and include_runfiles now defaults to False.