-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Reason behind the division of devDependencies and dependencies? #1764
Comments
In my experience But that's just my two cents. |
Yes this is another approach and I'm okay with it, but Same for webpack and others, in your specific case. |
There’s no real difference because the app has a build step, and produces a static bundle. So Node meaning doesn’t quite apply here. I’m trying to use |
I see, thank you for the answer. |
So what I've gleamed from this is the Node meaning doesn't apply here, and the distinction between |
So I have a question. Say that we implemented an express back end to serve our prebuilt application in production, would you still suggest keeping react and react-dom in dependencies or would you move them to devDependencies? Assume the server is NOT referencing react or react-dom. |
See Reason behind the division of devDependencies and dependencies? facebook/create-react-app#1764
See Reason behind the division of devDependencies and dependencies? facebook/create-react-app#1764
Hi, I searched in the past issues but I couldn't find anything related.
I'm wondering why do you leave in
dependencies
onlyreact
andreact-dom
and all the other dependencies are underdevDependencies
?I studied a lot about the distinction between the two lists, and to me, everything should go under
devDependencies
because none of them will be used directly by the compiled app, because Webpack will bundle them together into a single pack, meaning that if I donpm i my-app
I could directly use it without having to install any dependency at all because the bundle would be already shipped in the npm bundle.I know it's a bit abstract because the purpose of
create-react-app
is not to publish apps to npm, but it's the only way I can reason aboutdependencies
vsdevDependencies
.May you shed some light on the argument please?
The text was updated successfully, but these errors were encountered: