-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] default to yarn install --ignore-optional or allow user to configure using an env variable #779
Comments
@paprikati Is it too much to exclude installation of all the
On the other hand, I could see this as a useful flag, but not one that should be implemented at the Heroku/platform level since it's a flag for the package manager. Have you thought about opening an issue with Yarn to support this feature? |
So the problem I've got is that I need Arguably a nicer solution would be a yarn It would be really useful to have some way in heroku of avoiding pulling storybook, jest etc. - would love any other suggestions |
I have been thinking more about this, and I think it's tricky because the idea is that the @paprikati can you provide me more details here? How much more time are you seeing on install times? If you add build dependencies (such as webpack) to |
If I use devDependencies (rather than putting webpack etc. into Confusingly, if I put webpack etc. into To be totally honest, the way the JS ecosystem works right now, we would probably want to only be pushing a build artifact into the slug, rather than all the code (as you're essentially double storing everything), but I realise that's a bit scope-creep-ish from the original issue! |
I agree with your final point 😄 especially when we get into compiled languages like TypeScript. There's a For the slug size, what is the UPDATE: I wrote this and then realized that there's an earlier else that would catch |
The "prune" step for yarn does absolutely nothing to dev deps from what I can tell |
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:
The text was updated successfully, but these errors were encountered: