lingui / lingui/swc-plugin

Next react compiler incompatibility

Open
#205 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
78
Forks
33
Avg merge
7h 23m
Merged PRs (30d)
4

Description

Hi, Lingui's docs say :

> caution

> If you're using [React Compiler](https://react.dev/learn/react-compiler) with SWC, the @lingui/swc-plugin must run before the React Compiler plugin. This is necessary because Lingui macros need to be expanded before the React Compiler processes your code.

> However, in Next.js, the React Compiler is enabled via a simple boolean flag (reactCompiler: true) in next.config.js, and there's currently no way to control plugin ordering. As a result, Lingui may not work correctly with the React Compiler in SWC-based setups like Next.js.

Where can we find more information about this ? Is this a bug that has been acknowledged by the Next team ? Will it get fixed ? I could not find any information.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Lingui SWC plugin documentation and the Next.js reactCompiler configuration described in the report. Investigate whether Next.js exposes plugin ordering for SWC-based builds and check the linked React Compiler guidance. Done means documenting confirmed compatibility, an acknowledged upstream issue, or a reproducible path to a fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, react, rust
Domain
build-system, internationalization, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.