react-project
react-project copied to clipboard
Idea: Factor out `react-project-server`
In my projects, I usually like to keep build tools in devDependencies
, separate from code that's needed in the app itself (technically dependencies that are only used on the client should be here too, but that way lies madness and missing dependencies in prod, especially when server rendering).
I noticed that the blueprint lists react-project
as a full-on production dependency, and as far as I can tell, the only reason that this is necessary is because of the server rendering features. If those were factored out into a separate module, then react-project-server
could be under dependencies
and react-project
could be under devDependencies
.
That said, server rendering isn't really a use case I need at the moment (and I'll probably just wind up putting react-project
in devDependencies
anyways), so I can't give much more feedback on how the separation could work.
Update: After messing around with this a bit, looks like there isn't much support for the concept of devDependencies
at all! So that'd be a better place to start, I guess.
Yeah, too early for me to think about factoring parts out, but I know there's a react-router-addons-express
in there somewhere. Need to keep using this thing to do it right.
The wrong abstraction is way worse than the wrong one :)
I like to do git push
deployment, like heroku, so the production box's npm install
needs all of that stuff for the build.