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.
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!
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.
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.
Everything's in devDependencies now, because like you pointed out, none of them are needed in the published production build.
Most helpful comment
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
devDependencieswhere 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!