Skip to content

yarn upgrade react@next breaks webpack bundling, peer dependencies #4043

@Connorelsea

Description

@Connorelsea

Do you want to request a feature or report a bug?

Bug

Behavior and how to reproduce:

Bug. When running yarn upgrade react@next to install react version 16 beta 1, multiple packages that are dependencies of the repository suddenly have react as a dependency in their personal node modules even though react is specified as a peer dependency and not a direct dependency of these packages. This creates huge size increase in the webpack bundle due to each child package having its own react.

This does not occur under NPM when deleting the lockfile and running npm install instead of yarn

See this thread for more context and exact photographs of the analyzer tool observing the output of the webpack bundle on prod build. https://twitter.com/Connorelsea/status/890606030467473408

Please mention your node.js, yarn and operating system version.

Mac OS High Sierra
Yarn 0.24.6
NPM 5.3.0
Node 8.0.0

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