Related to #116. Basically, when using the --production flag, or NODE_ENV=production environment variable, Yarn will not install any package listed in devDependencies. https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-production
In our config files we are using packages that also needs to be available on production to compile the assets. Therefore, the dependencies which are used in production should be moved to dependencies block instead of devDependencies.
I can make a PR once #111 is merged
Background: right now we're putting build deps under devDependencies even though they're required in production.
Pretty sure that setting NPM_CONFIG_PRODUCTION=false on production fixes this problem. This should probably be hardcoded into the rake task, in fact.
I think the "correct" solution would be to move everything under dependencies rather than devDependencies. Right now they're being misused in a way that's convenient (and common) but that doesn't actually reflect their semantics.
@dleavitt The only things that should go under devDependencies are things like eslint, flow, the webpack dev server. Any build tools need to be under "dependencies.
Indeed, that's what I was (trying to) say above. Sure makes package.json prettier when you do it the wrong way though.
Yes let's fix the root issue and move away from errant use of devDependencies.
On Feb 27, 2017, at 17:48, Daniel Leavitt notifications@github.com wrote:
Indeed, that's what I was (trying to) say above. Sure makes package.json prettier when you do it the wrong way though.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Most helpful comment
Yes let's fix the root issue and move away from errant use of devDependencies.