Skip to content

Next react compiler incompatibility #205

@laem

Description

@laem

Hi, Lingui's docs say :

caution

If you're using 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.

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