From 163ab43da331d4cb8485d242e41d132ac1bf298d Mon Sep 17 00:00:00 2001 From: Athou Date: Fri, 11 Jul 2025 16:56:03 +0200 Subject: [PATCH] lingui documentation mentions that their plugin should be declared before the react compiler plugin --- commafeed-client/vite.config.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commafeed-client/vite.config.ts b/commafeed-client/vite.config.ts index 0ad960ec..ba6f0ec3 100644 --- a/commafeed-client/vite.config.ts +++ b/commafeed-client/vite.config.ts @@ -10,7 +10,13 @@ export default defineConfig(() => ({ plugins: [ react({ babel: { - plugins: [["babel-plugin-react-compiler", { target: "19" }], "@lingui/babel-plugin-lingui-macro"], + plugins: [ + // support for lingui macros + // needs to be before the react compiler plugin + "@lingui/babel-plugin-lingui-macro", + // react compiler + ["babel-plugin-react-compiler", { target: "19" }], + ], }, }), lingui(),