From 6344657940f11450db3a8dafb406a95d12f50b46 Mon Sep 17 00:00:00 2001 From: Athou Date: Wed, 2 Sep 2026 18:11:23 +0200 Subject: [PATCH] speed up client compilation by using oxc-transform-react as the react compiler --- commafeed-client/package-lock.json | 427 ++++++++++++++++++++++++++--- commafeed-client/package.json | 2 +- commafeed-client/vite.config.ts | 11 +- 3 files changed, 387 insertions(+), 53 deletions(-) diff --git a/commafeed-client/package-lock.json b/commafeed-client/package-lock.json index c5ac2156..1c2826b3 100644 --- a/commafeed-client/package-lock.json +++ b/commafeed-client/package-lock.json @@ -62,8 +62,8 @@ "@types/throttle-debounce": "5.0.2", "@types/tinycon": "0.6.7", "@vitejs/plugin-react": "6.1.1", - "babel-plugin-react-compiler": "1.0.0", "jsdom": "30.0.1", + "oxc-transform-react": "^0.145.0", "typescript": "7.0.2", "vite": "8.2.2", "vite-plugin-checker": "0.14.5", @@ -1625,6 +1625,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/@react-querybuilder/core": { "version": "8.23.1", "resolved": "https://registry.npmjs.org/@react-querybuilder/core/-/core-8.23.1.tgz", @@ -2879,50 +3226,6 @@ "npm": ">=6" } }, - "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/babel-plugin-react-compiler/node_modules/@babel/helper-string-parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", - "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/babel-plugin-react-compiler/node_modules/@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/babel-plugin-react-compiler/node_modules/@babel/types": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", - "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/baseline-browser-mapping": { "version": "2.11.20", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.20.tgz", @@ -4744,6 +5047,40 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "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/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", diff --git a/commafeed-client/package.json b/commafeed-client/package.json index 309ff55a..d2aabe67 100644 --- a/commafeed-client/package.json +++ b/commafeed-client/package.json @@ -69,8 +69,8 @@ "@types/throttle-debounce": "5.0.2", "@types/tinycon": "0.6.7", "@vitejs/plugin-react": "6.1.1", - "babel-plugin-react-compiler": "1.0.0", "jsdom": "30.0.1", + "oxc-transform-react": "^0.145.0", "typescript": "7.0.2", "vite": "8.2.2", "vite-plugin-checker": "0.14.5", diff --git a/commafeed-client/vite.config.ts b/commafeed-client/vite.config.ts index f0d43a7d..9c293278 100644 --- a/commafeed-client/vite.config.ts +++ b/commafeed-client/vite.config.ts @@ -1,16 +1,13 @@ -import { lingui } from "@lingui/vite-plugin" +import { lingui, linguiTransformerBabelPreset } from "@lingui/vite-plugin" import babel from "@rolldown/plugin-babel" -import react, { reactCompilerPreset } from "@vitejs/plugin-react" +import react from "@vitejs/plugin-react" import { defineConfig } from "vite" import checker from "vite-plugin-checker" export default defineConfig(() => ({ plugins: [ - react(), - babel({ - presets: [reactCompilerPreset()], - plugins: ["@lingui/babel-plugin-lingui-macro"], - }), + babel({ presets: [linguiTransformerBabelPreset()] }), + react({ compiler: true }), lingui(), checker({ // temporary disabled until TypeScript 7 exposes a stable api