Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

In React Redux template, move packages to devDevendencies where possible #747

Closed
DanHarman opened this issue Mar 8, 2017 · 4 comments
Closed

Comments

@DanHarman
Copy link
Contributor

I'm getting up to speed with React and everywhere else I've looked at templates/setup there has been usage of devDependencies in packages.json. Would you mind explaining what the reasoning for not using them is in this template?

p.s. was also amused to see a dependency on node-noop.

https://news.ycombinator.com/item?id=13588428
https://github.com/euank/node-noop

Reviews
"Everything that is wrong with the Node ecosystem." — An enlightened Reddit user.

@SteveSandersonMS
Copy link
Member

Previously, the server-side prerendering used Webpack and all the other packages there at runtime. So it wouldn't have worked to put them into devDependencies.

However, a couple of months ago, we changed to a simpler and more robust system whereby the server-side prerendering bundle was generated at build time, and all those Node packages aren't required in production.

So, we could (and should) now streamline this by moving packages to devDependencies where possible. It doesn't cause any problem as-is, but would just be better organised that way. I'll rename this issue and leave it open to track that task. Thanks for raising this point!

@SteveSandersonMS SteveSandersonMS changed the title React Redux template devDevendencies In React Redux template, move packages to devDevendencies where possible Mar 8, 2017
@DanHarman
Copy link
Contributor Author

Awesome, and thanks a lot to all involved for this template. There is no way I'd have got to such a complex config that fits dotnet without it. A lot of moving parts to integrate with all this node ecosystem, but its really coming together now.

@stephtr
Copy link
Contributor

stephtr commented Jul 8, 2017

Just for clarification: One should move as many dependencies such that dotnet runs in development mode with already compiled bundles without errors?
Because for production mode no npm packages are needed at all and for running in development mode even the react-template needs the packages listed in devDependencies.

@SteveSandersonMS
Copy link
Member

Everything's in devDependencies now, because like you pointed out, none of them are needed in the published production build.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants