napalm
napalm copied to clipboard
node_modules get rebuilt with the main derivation
Whenever the source changes, the node_modules get rebuilt. For development this can add quite a lot to the iteration time.
What would you think of building the node_modules in a separate derivation and then symlinking it into the main derivation during build? We are doing something similar in yarn2nix.
very good point! I haven't used napalm for local development (I npm build) but I understand this can be an issue.
For local development, there could also be a mode where node_modules gets symlinked into the current folder when the shellHook get executed. That way the user has the exact same dependencies and can also fetch them from binary cache.