From d24c7a6ca5b189526afa6accaa4910bd536239c5 Mon Sep 17 00:00:00 2001 From: Daniel Martens Date: Thu, 10 Sep 2026 11:50:36 +0200 Subject: [PATCH] chore: use oxc-transform-react instead of babel --- package-lock.json | 439 ++++++++++++++++++++++++++++++++++++++++------ package.json | 4 +- vite.config.ts | 10 +- 3 files changed, 385 insertions(+), 68 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e52e2b5..885279b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,23 +48,21 @@ "zustand": "^5.0.15" }, "devDependencies": { - "@babel/core": "^7.29.7", "@eslint/core": "^1.2.1", "@playwright/test": "^1.62.1", - "@rolldown/plugin-babel": "^0.2.3", "@types/eslint-plugin-jsx-a11y": "^6.10.1", "@types/esquery": "^1.5.4", "@types/node": "^24.13.3", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.5", "@vitejs/plugin-react": "^6.1.1", - "babel-plugin-react-compiler": "^1.0.0", "eslint": "^9.39.5", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-playwright": "^2.11.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.1.1", "lint-staged": "^17.4.1", + "oxc-transform-react": "0.145.0", "postcss": "^8.5.26", "prettier": "3.9.6", "tailwindcss": "^3.4.19", @@ -1223,6 +1221,353 @@ "url": "https://github.com/sponsors/Boshen" } }, + "node_modules/@oxc-transform-react/binding-android-arm-eabi": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-android-arm-eabi/-/binding-android-arm-eabi-0.145.0.tgz", + "integrity": "sha512-KuK3zAp10yFyeAxIXlZn2ycsFpaKLxUmj5BVRS1io4XfwnKTozb/goZakgKD5JEiHOVOtEKt1r7pTrmW/pFxxA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-android-arm64": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-android-arm64/-/binding-android-arm64-0.145.0.tgz", + "integrity": "sha512-eDUKx6MAgRAF67JPScjLF6h8lL2qmlvFrXGSG8mYFIVJb++NMyDygiIo8TAKdWQNguoBElUZw/SK2EPRaKsryQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-darwin-arm64": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-darwin-arm64/-/binding-darwin-arm64-0.145.0.tgz", + "integrity": "sha512-msCgwbVLswJ08JaUOjfPddieVJwE4IT1Y23A1DDyKVyzZp2ormo9a4ffDEu9nmmovdEj8VqAyFgggsgzIkBVrA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-darwin-x64": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-darwin-x64/-/binding-darwin-x64-0.145.0.tgz", + "integrity": "sha512-R0PtsoOCsARulmWhLG1fFInT+98TRl/H6w6ifi8XOLvpdsksD1rxsw4Ol84lHbdHCcMNjfJTckZzQIZBMiXkLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-freebsd-x64": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-freebsd-x64/-/binding-freebsd-x64-0.145.0.tgz", + "integrity": "sha512-/MJ7+IvxfutSGqn6hIXU92wGNk5FlkqbTHM+kEl7ytLLOSAyivYhF2gxdYMmXTwOG56k2XviMcE0D/TBjdyoRA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-arm-gnueabihf": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.145.0.tgz", + "integrity": "sha512-ssHZ0W2wSjQwaBQdkg8u+A7dTdw2vkGSK0hRfCoDCkRkETu+19Q8Tae7NNxlYHcP1iUQYhEj8Qfgpq+S/MdrYA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-arm-musleabihf": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.145.0.tgz", + "integrity": "sha512-adJy4lQVcoIW6CUzQYbDgbHZMDSLoizwCinG2Dex29jdACKwIgXQQrIAHAgfveaZleKIB/rf3usGoRcOGyfz7Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-arm64-gnu": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.145.0.tgz", + "integrity": "sha512-7KRa0CC1FaSKx5sy+bDtqGvXF+RiVoMmSe8OmTKm9kRZkNVdmsmpnsQhgravehTohlWDveo5aoGMwcFtffGDmw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-arm64-musl": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.145.0.tgz", + "integrity": "sha512-fGhZkDnk2RoMp6THas9HFGorF0A1wwPPA/2Lu9IUO1ip5MJqS/JG7/conmiz0DBG0PWBtnKl2Y8sA/VBiD/oQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-ppc64-gnu": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.145.0.tgz", + "integrity": "sha512-VBaUTjRZYRypD2tL7cmbM2Fn6fvTnacLQ1GdsU1Y6A3fkqA/z+wc5Vy1QnnuFe9sIwb9xCvSS2tJVlucR39FYw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-riscv64-gnu": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.145.0.tgz", + "integrity": "sha512-s2cimMVAmWe9dtjyWdGsYtevi9C7gJoOXwrCZD0BX7hgyGmuBO3iWQjx4W48hdXlWS176NoxuFIHAN72N86upA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-riscv64-musl": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.145.0.tgz", + "integrity": "sha512-hFPrsL2nKL4aa8vFmheR53PcrxQgym8bnaSD1pMX9IoyQq+/ksAuw1CDJSV9c5xhxxZdw/KTPVer7M/6OQvfoA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-s390x-gnu": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.145.0.tgz", + "integrity": "sha512-YLKhySqqu0JAtT0z8GuaFF7Hht3IvQLZShTH0DxeV28NwSthva+qJ7GN09ALT1bqRVvMjNGycgPHaGSWBUIt7A==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-x64-gnu": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.145.0.tgz", + "integrity": "sha512-WqgJ+0M9mwQ1cRfSgk4vzYudD2imLSBhUZ2QFes06vUjigts5Dw4NajWKc2JibPHYsoiUA9Zj39zWwC5AxXEGQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-linux-x64-musl": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-x64-musl/-/binding-linux-x64-musl-0.145.0.tgz", + "integrity": "sha512-eIre/TjGt07IVKoWUrUOkPxN7UKeWxbiGvCywoGLDRe1/2K50MrA2vQahZ8AlW5CLmajOr9ePKrkRzLg1fa0cQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-openharmony-arm64": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-openharmony-arm64/-/binding-openharmony-arm64-0.145.0.tgz", + "integrity": "sha512-zhWiyJ+9XD4cuhSZIT6aozuXDHcZHNdoVe88xVmx2XN00anjZ6VAGj31rhD8ndha/F8NllcQEr8Q61Dr2MHv5Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-win32-arm64-msvc": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.145.0.tgz", + "integrity": "sha512-Q0oiZfrfYyhmpqH2K0dylDTooIadecGsoiQks7G0AbuszCu2I7zYyJo4ArFc3d5Hj49Jjc5dDAE5WP/Sg2p8hw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-win32-ia32-msvc": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.145.0.tgz", + "integrity": "sha512-ERpriVJY5S8hXd3BJi4UtzsIVsEQnntmpqTgRqh0XCaflLRLTQnPWpkO8rgtI7xye5MRhfhA+qsxKg2olJs4qA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-transform-react/binding-win32-x64-msvc": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.145.0.tgz", + "integrity": "sha512-sa781BGPLDw8+7ATrgUpLr0f4t0Q14O+zk3fOuQbUpjW5jERc9a3k1xIYKX1JkTG/sszoFhi8LzyCoMC49tkWA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -2382,50 +2727,6 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/plugin-babel": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@rolldown/plugin-babel/-/plugin-babel-0.2.3.tgz", - "integrity": "sha512-+zEk16yGlz1F9STiRr6uG9hmIXb6nprjLczV/htGptYuLoCuxb+itZ03RKCEeOhBpDDd1NU7qF6x1VLMUp62bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=22.12.0 || ^24.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.29.0 || ^8.0.0-rc.1", - "@babel/plugin-transform-runtime": "^7.29.0 || ^8.0.0-rc.1", - "@babel/runtime": "^7.27.0 || ^8.0.0-rc.1", - "rolldown": "^1.0.0-rc.5", - "vite": "^8.0.0" - }, - "peerDependenciesMeta": { - "@babel/plugin-transform-runtime": { - "optional": true - }, - "@babel/runtime": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@rolldown/plugin-babel/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@rolldown/pluginutils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", @@ -3232,16 +3533,6 @@ "node": ">= 0.4" } }, - "node_modules/babel-plugin-react-compiler": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-react-compiler/-/babel-plugin-react-compiler-1.0.0.tgz", - "integrity": "sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.26.0" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -7248,6 +7539,40 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/oxc-transform-react": { + "version": "0.145.0", + "resolved": "https://registry.npmjs.org/oxc-transform-react/-/oxc-transform-react-0.145.0.tgz", + "integrity": "sha512-y8cfjow11WKvDekonySPVvRUvNuIvqNT0LZ0Aey6j5dsNUD6k4hy6Mae/SLmng5egmb1GdJS11GduJ+IoEAXEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxc-transform-react/binding-android-arm-eabi": "0.145.0", + "@oxc-transform-react/binding-android-arm64": "0.145.0", + "@oxc-transform-react/binding-darwin-arm64": "0.145.0", + "@oxc-transform-react/binding-darwin-x64": "0.145.0", + "@oxc-transform-react/binding-freebsd-x64": "0.145.0", + "@oxc-transform-react/binding-linux-arm-gnueabihf": "0.145.0", + "@oxc-transform-react/binding-linux-arm-musleabihf": "0.145.0", + "@oxc-transform-react/binding-linux-arm64-gnu": "0.145.0", + "@oxc-transform-react/binding-linux-arm64-musl": "0.145.0", + "@oxc-transform-react/binding-linux-ppc64-gnu": "0.145.0", + "@oxc-transform-react/binding-linux-riscv64-gnu": "0.145.0", + "@oxc-transform-react/binding-linux-riscv64-musl": "0.145.0", + "@oxc-transform-react/binding-linux-s390x-gnu": "0.145.0", + "@oxc-transform-react/binding-linux-x64-gnu": "0.145.0", + "@oxc-transform-react/binding-linux-x64-musl": "0.145.0", + "@oxc-transform-react/binding-openharmony-arm64": "0.145.0", + "@oxc-transform-react/binding-win32-arm64-msvc": "0.145.0", + "@oxc-transform-react/binding-win32-ia32-msvc": "0.145.0", + "@oxc-transform-react/binding-win32-x64-msvc": "0.145.0" + } + }, "node_modules/p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", diff --git a/package.json b/package.json index bc3bdb2e..5ec477e1 100644 --- a/package.json +++ b/package.json @@ -75,23 +75,21 @@ "zustand": "^5.0.15" }, "devDependencies": { - "@babel/core": "^7.29.7", "@eslint/core": "^1.2.1", "@playwright/test": "^1.62.1", - "@rolldown/plugin-babel": "^0.2.3", "@types/eslint-plugin-jsx-a11y": "^6.10.1", "@types/esquery": "^1.5.4", "@types/node": "^24.13.3", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.5", "@vitejs/plugin-react": "^6.1.1", - "babel-plugin-react-compiler": "^1.0.0", "eslint": "^9.39.5", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-playwright": "^2.11.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.1.1", "lint-staged": "^17.4.1", + "oxc-transform-react": "0.145.0", "postcss": "^8.5.26", "prettier": "3.9.6", "tailwindcss": "^3.4.19", diff --git a/vite.config.ts b/vite.config.ts index 1714a71f..0f2b05f9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,6 +1,5 @@ -import babel from "@rolldown/plugin-babel"; import { defineConfig } from "vite"; -import react, { reactCompilerPreset } from "@vitejs/plugin-react"; +import react from "@vitejs/plugin-react"; const chunkGroups = { // Core React dependencies (rarely change) @@ -65,12 +64,7 @@ function createChunkGroupPattern(dependencies: string[]) { } export default defineConfig({ - plugins: [ - react(), - babel({ - presets: [reactCompilerPreset()], - }), - ], + plugins: [react({ compiler: true })], resolve: { tsconfigPaths: true, },