Skip to content

@lingui/vite-plugin - support for vite 8 #2473

@landsman

Description

@landsman

Problem Description

└─┬ @lingui/vite-plugin@5.9.2
  └── peer vite@^3 || ^4 || ^5.0.9 || ^6 || ^7: resolved to 8.0.0

error: Uncaught (in promise) TypeError: Cannot convert undefined or null to object

⏺ Binary search / plugin isolation:

  1. The error was TypeError: Cannot convert undefined or null to object during transforming... with no stack trace — Deno swallows it.
  2. Since Vite 8 (Rolldown) changed plugin internals, and two plugins explicitly declared no Vite 8 peer dep support (@deno/vite-plugin, @lingui/vite-plugin), plugins were the prime suspects.
  3. Commented out plugins one at a time:
    - Removed sentryVitePlugin → still failed
    - Removed deno() → still failed
    - Removed lingui() → build succeeded

Additional Context

  • Repo: vitejs/vite-plugin for @lingui/vite-plugin
  • Versions: @lingui/vite-plugin@5.9.2 + vite@8.0.0
  • Error: TypeError: Cannot convert undefined or null to object during transforming... phase
  • Repro: Add lingui() to plugins in vite.config.ts, run vite build
  • Workaround: Remove lingui() — Lingui macros still work via @lingui/babel-plugin-lingui-macro inside @vitejs/plugin-react

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions