Skip to content

A local-first personal finance app

Fix React compiler behaviour in dev mode (#5853)

Julian Dominguez-Schatzad9980307e7b
diff --git a/packages/desktop-client/vite.config.mts b/packages/desktop-client/vite.config.mts
index c15af665d2..977eb0c0d4 100644
--- a/packages/desktop-client/vite.config.mts
+++ b/packages/desktop-client/vite.config.mts
@@ -9,7 +9,6 @@ import { visualizer } from 'rollup-plugin-visualizer';
import { defineConfig, loadEnv, Plugin } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
import viteTsconfigPaths from 'vite-tsconfig-paths';
-import reactCompiler from 'babel-plugin-react-compiler';
const addWatchers = (): Plugin => ({
name: 'add-watchers',
@@ -179,7 +178,8 @@ export default defineConfig(async ({ mode }) => {
addWatchers(),
react({
babel: {
- plugins: [reactCompiler],
+ // n.b. Must be a string to ensure plugin resolution order. See https://github.com/actualbudget/actual/pull/5853
+ plugins: ['babel-plugin-react-compiler'],
},
}),
viteTsconfigPaths({ root: '../..' }),
diff --git a/upcoming-release-notes/5853.md b/upcoming-release-notes/5853.md
new file mode 100644
index 0000000000..14487038a2
--- /dev/null
+++ b/upcoming-release-notes/5853.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [jfdoming]
+---
+
+Fix React compiler behaviour in dev mode