Skip to content

Make the node_modules folder more space efficient by having a --production flag to install only the files used #292

Discussion options

You must be logged in to vote

@destroyer22719 Appreciate the suggestion. After some discussion in a recent RFC call, I don't think there's an easy way to support this today. Unfortunately, we don't tend to know the intent of the package author; ie. potentially an author wants to ship files that aren't used at runtime (ex. licenses, static files/assets to be copied etc.) so it's hard to determine what is or isn't used or what should or should not be installed. Static code analysis of your project would also only tell you so much about usage.

That said, one way to solve this issue today is, ask package authors to only ship the necessary files required for usage of that package (which may mean they end up publishing diff…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@destroyer22719
Comment options

Answer selected by darcyclarke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
RRFC
Labels
None yet
3 participants