-
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
How to avoid installation of devDependencies when environment is *not* production #355
Comments
I've resorted to dropping our app's dependency on Not ideal, but given the various constraints this was the best solution I could come up with. If anyone has other idea's I'd love to hear them. |
That's a reasonable solution; additionally, Yarn now supports |
I've tried to use the The separate |
@adamreisnz that's a good general solution for both yarn and npm (the |
We have several environments for our app, e.g.
dev
,staging
,demo
andproduction
.We use the
NODE_ENV
variable to set the correct environment, which in turn then loads the correct configuration etc. for each environment.The problem is that
npm install
(oryarn
for that matter) will installdevDependencies
also for ourstaging
anddemo
environments.How can we prevent this and force the build to only install the production dependencies while leaving
NODE_ENV
unchanged?The text was updated successfully, but these errors were encountered: