Skip to content

Vite >=3.1.5 breaks Jotai babel plugins #10430

@gunters63

Description

@gunters63

Describe the bug

Vite 3.1.5 changed the processing of package exports. This breaks two Jotai plugins (debug-label and react-refresh).

vite dev chokes with the following error:

image

Reverting to 3.1.4 makes the error go away.

The author of Jotai thinks this may be a vite problem, not a problem with Jotai itself.

See discussion with initial analysis here: pmndrs/jotai#1475

Reproduction

https://github.com/gunters63/jotei-vite-import-error

Steps to reproduce

pnpm install, then pnpm dev

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (16) x64 AMD Ryzen 9 6900HS with Radeon Graphics        
    Memory: 6.27 GB / 31.26 GB
  Binaries:
    Node: 18.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.608.0), Chromium (106.0.1370.37)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vite: 3.1.7 => 3.1.4

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    p4-importantViolate documented behavior or significantly improves performance (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions