Option to ignore optional dependencies #4960
-
Why using optional deps?Cleaner code
Less risk of failing buildTechnically, development tooling is actually "optional" dependencies. It is not need to build the app, so in my opinion we should avoid installing those on distant server if we don't need them. For instance, most of the time, Storybook has nothing to do on production environment. For instance, I just hit the scenario where Cypress failed to download and install on Vercel... but I don't need Cypress at all for my app to run. On a dockerized version of my app, putting non-vital development tooling in optionalDependencies saved around 600mo (from 1.9go to 1.3go) and minutes of build time. PalliativeCurrently, the only way I found to not install optional deps was to force installing only production deps with
Feature request
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @eric-burel Thanks for the suggestion! We are considering adding a new feature to allow users to customize the Install Command, similar to the way you can customize the Build Command. This is being tracked internally as Story 5108 and I believe it would work for your use case, thanks! |
Beta Was this translation helpful? Give feedback.
-
any update on this to ignore certain dependencies ? |
Beta Was this translation helpful? Give feedback.
Hi @eric-burel
Thanks for the suggestion!
We are considering adding a new feature to allow users to customize the Install Command, similar to the way you can customize the Build Command.
This is being tracked internally as Story 5108 and I believe it would work for your use case, thanks!