Skip to content
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

The devDependencies and dependencies are not separated in package.json #3220

Closed
sarbull opened this issue Sep 29, 2017 · 2 comments
Closed

Comments

@sarbull
Copy link

sarbull commented Sep 29, 2017

Do you want to request a feature or report a bug?
I'm not sure if it's a bug or a feature.

What is the current behavior?
When i run npm run eject the generated react app contains a package.json with all the dependencies both devDependencies and dependencies on the same key, in dependencies.

What is the expected behavior?
We should have seen two keys in package.json

  • devDependencies
  • dependencies

Which versions of React, and which browser / OS are affected by this issue?
1.4.1

@tharakawj
Copy link
Contributor

This question has been raised a few times before. See the discussion #2696. So I'm closing this issue. But please feel free to comment if you have something more to add there.

@xml
Copy link

xml commented Apr 9, 2018

Actually, @tharakawj , please consider reopening. The discussion on #2696 is about what behavior should be for un-ejected dependencies. I have no qualm or quibble with that decision, which seems to be a compromise to minimize admin overhead for fully-encapsulated users. But @sarbull is asking about the eject use-case.

When someone ejects, they're essentially opting out of the 'fire-and-forget' approach: they need something that works in a self-administered environment, with traditional CI. Wouldn't it be reasonable - again, only in the eject case - to assume that most build-time dependencies formerly in react-scripts would appropriately go into devDependencies?

(Yes, it's clearly possible for someone to do this themselves. Which I've already done. I'm asking more in the sense of: as good stewards for the community, and definers of best practices, what approach does the CRA team want to suggest is best-practice?)

@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
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