Skip to content

Eject adds build tools to dependencies instead of devDependencies #12170

@jackHedaya

Description

@jackHedaya

Describe the bug

When running react-scripts eject, the generated package.json has loaders, webpack, jest, etc all in dependencies. Correct me if I'm wrong, but these fields should all be in devDependencies instead.

Did you try recovering your dependencies?

N/A

Environment

System:
    OS: macOS 12.2.1
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 17.4.0 - /opt/homebrew/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.5.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 99.0.4844.51
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.3
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

  1. npx create-react-app my-proj --template typescript
  2. cd my-proj && npm eject

Expected behavior

Build tools are inserted under devDependencies.

Actual behavior

Build tools are inserted under dependencies.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions