Skip to content

[Bug] Inconsistent CJS interop #619

@dubzzz

Description

@dubzzz

Version

3.0.6

Link to Minimal Reproduction

https://stackblitz.com/edit/vitejs-vite-jyrcmi77?file=src%2Fmain.tsx

Steps to Reproduce

  1. Start a demo project with Vite 8
  2. Setup echarts-for-react on the first component
  3. Run the code in dev mode
  4. Open the browser

It crashes with the error:

Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

The failure occurs with EChartsReactCore.

Current Behavior

It crashes.

Expected Behavior

It does not crash.

Environment

- OS: Windows 11
- Browser: 149.0b10 (aarch64)
- Framework: React@19

Any additional comments?

Documented on Vite 8 side:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions