Skip to content

[EXP] Update Plasmo Library to Support React 19 #1216

@sanjaysah101

Description

@sanjaysah101

What is the example you wish to see?

Description

While upgrading to React 19, I encountered peer dependency issues with the Plasmo package. The current version (0.90.3) has dependencies that require react@^18.2.0 and react-dom@^18.2.0, which causes warnings when using React 19.

Warning Message

WARN Issues with peer dependencies found
.
└─┬ plasmo 0.90.3
  └─┬ @plasmohq/parcel-config 0.42.0
    ├─┬ @parcel/config-default 2.9.3
    │ └─┬ @parcel/optimizer-htmlnano 2.9.3
    │   └─┬ htmlnano 2.1.1
    │     └── ✕ unmet peer svgo@^3.0.2: found 2.8.0 in @parcel/optimizer-htmlnano
    └─┬ @plasmohq/parcel-transformer-vue 0.5.0
      └─┬ @plasmohq/consolidate 0.17.0
        ├── ✕ unmet peer react@^18.2.0: found 19.0.0
        └── ✕ unmet peer react-dom@^18.2.0: found 19.0.0

Expected Behavior

Plasmo should support React 19 without peer dependency warnings.

Steps to Reproduce

  1. Create a plasma app pnpm create plasmo
  2. Observe the peer dependency warnings in the console.

Possible Solution

  • Update @plasmohq/consolidate and related dependencies to support react@19.x.x and react-dom@19.x.x.
  • Update peerDependencies in Plasmo’s package.json to allow React 19.

Environment

  • Plasmo Version: 0.90.3
  • React Version: 19.0.0
  • Node.js Version: (e.g., 18.x or 20.x)
  • Package Manager: (npm/yarn/pnpm)

Additional Context

Would love to know if there's a roadmap for React 19 support or if there's a workaround for now. Thanks! 🚀

Is there any context that might help us understand?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions