heroku / heroku/heroku-buildpack-nodejs
[Feature Request] default to yarn install --ignore-optional or allow user to configure using an env variable
- Dominant language
- Shell
- Stars
- 1.3k
- Forks
- 2.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 30
Description
Lots of modern JS projects have devDependencies that you need in order to build the app (webpack etc.). But they also use big tools like storybook and jest which are not required at buildTime or runTime.
I would like to avoid installing these during my build process (because its slow). One way would be to put them as optionalDependencies in the package.json, and then run yarn install --ignore-optional.
Is this something the buildpack could support? I can see a few options:
* custom install script (like heroku-install)
* env variable YARN_IGNORE_OPTIONAL
* default to include --ignore-optional flag
Contributor guide
Research direction
No file or test is named in the issue. Start by tracing the buildpack's install path and how it invokes Yarn, then compare the proposed custom install script (`heroku-install`) with the `YARN_IGNORE_OPTIONAL` option; done means agreeing on and validating one supported configuration approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, shell
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100