react / react/react-native

Dev Dependecies in production build?

Open
#55,084 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Needs: Attention Needs: Repro
Dominant language
C++
Stars
127k
Forks
25.3k
Avg merge
1d 23h
Merged PRs (30d)
4

Description

Hello,

I found this line on the hunt of a prod build bloatware:
https://github.com/facebook/react-native/blob/a5fc307eb4a683730b7220366b1e988a61bad943/packages/react-native/package.json#L173

Shouldn't this be a devDependency? Is this a bug or can somebody explain this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/react-native/package.json at the dependency line linked in the issue, then inspect how that dependency is used during the production build. Confirm whether it is required at runtime or only for development, and verify the production build no longer includes unnecessary dependency weight if the classification changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.