From 35ec77fcb74bf8d9b168e30a9ea4d815869d11e0 Mon Sep 17 00:00:00 2001 From: honbin Date: Thu, 29 Oct 2026 21:34:44 +0900 Subject: [PATCH] Drop React Compiler The pages ship no client JavaScript, so the compiler only rewrote the build-time SSR bundle and the published files are identical without it. It also needs oxc-transform-react 0.152.x for @vitejs/plugin-react 6.1.2, while void init adds ^0.149.0. Turn it back on with a matching version once a page hydrates. --- package-lock.json | 382 ---------------------------------------------- package.json | 1 - vite.config.ts | 2 +- 3 files changed, 1 insertion(+), 384 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70fa2a6..975a0a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,6 @@ "@types/react-dom": "^19.2.3", "@void/md": "1.3.0", "@void/react": "1.3.0", - "oxc-transform-react": "^0.149.0", "typescript": "^7.0.2", "vite": "npm:@voidzero-dev/vite-plus-core@^1.3.0", "vite-plus": "^1.3.0", @@ -2443,353 +2442,6 @@ "url": "https://github.com/sponsors/oxc-project" } }, - "node_modules/@oxc-transform-react/binding-android-arm-eabi": { - "version": "0.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-android-arm-eabi/-/binding-android-arm-eabi-0.149.0.tgz", - "integrity": "sha512-j9tB2Ug9rZMxBxE57nJJvB0QMXqrAYdPB5653DtAFCbp5WmuOPot2iz9Ctm64oMQchdutYwVoHKfZPC23ZpN+w==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-android-arm64/-/binding-android-arm64-0.149.0.tgz", - "integrity": "sha512-GE5jGUca23DbM6jsMccmrkBe7LlbKvO03JznFXMupKN3os2MrwNnT9bm3CxgC5ih0KKnpwdOhP6+gayaf/RsRQ==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-darwin-arm64/-/binding-darwin-arm64-0.149.0.tgz", - "integrity": "sha512-3XWdu3umUjOyDWamugshtYYglZJR/TnP7gjnvGc3vI1ozqRrtS+QLjs73XOKU7KTkfuoBSh0lf0cF+Y8u8aqng==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-darwin-x64/-/binding-darwin-x64-0.149.0.tgz", - "integrity": "sha512-qUcf+jK5c5uvSCH392AOSZKj6fwdYxMC9zwpshIzf0Kpj73RGZciN3E7OG77epVQvh+B/REurBTV+dmywmZwRQ==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-freebsd-x64/-/binding-freebsd-x64-0.149.0.tgz", - "integrity": "sha512-curcmpjfcjNJd+OcvnBAZGWbY5oWNmOduYMrIpRAt+2Vr85BOk6t++bjn1vIJ+0CIOSd86EPNh5H2uEGfrjUpg==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.149.0.tgz", - "integrity": "sha512-6PsFpEwOLCMLTCH7K9/UaUY9JXimAf3PaVrUKFEKZenBAVByV8Rpk5hK8xFk9+xWA4+a3EckqzgT7VHnTV8POQ==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.149.0.tgz", - "integrity": "sha512-Jqnar7VWfwZovsfhJu0cXXOtypQYaEPSrhScNVtAPrWkb8bpuvF2JJ3BebxyvGcXi2MMRMaD9LyyVrBlGfeCFw==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.149.0.tgz", - "integrity": "sha512-c+pZ8PPe9KpaTvkASe1QK//YxghFVoPTvg/oOQqldBUje04kemIR7ThfvLDfMe36UQ/wm/KYSNmISDJis1DXZQ==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.149.0.tgz", - "integrity": "sha512-EUxJd2xsFvNvfMGZIgssLXH7AcsRTCo/2BXUZZOUgyPB59KsnxhQ+KRwi9NeX7YhgLMx6fv+ZuYpCyPs6PIw4A==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.149.0.tgz", - "integrity": "sha512-+DtOzO4MgQvubmmZRQPpUO6aWffXkrjv3XnenkC9Jf0UMW644o0TRADCfP0Qye+evLv9pEHpiLbI9aH5w6WzpQ==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.149.0.tgz", - "integrity": "sha512-8s2RVzHkUjDvGM1k9BdVxUvoJUcMQ2yUFH+vJWhb+T/Pwsr0EasHih5YN+zv+Wx/YviiH0gDkqxx2vpInAhQyA==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.149.0.tgz", - "integrity": "sha512-S/GBmspvYLfxbT6muuyaguA/9msJvZAaZ1fHrAt+moW6msZyokEnJ/3CvOX15gcXbj93+LSSsusReQpbovHZhQ==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.149.0.tgz", - "integrity": "sha512-8U+ZC2sqpXxDptpvqQRtompH1ivacHiEUgtsMva8IugCvxcNmd+A7sDtxlOYfNrKPO8ToUPEuWA9qEzJtm6YAg==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.149.0.tgz", - "integrity": "sha512-RLMKO7f7c/lM5Q3Uw8SFyI7eJ7tPqPjo/3C2EgANvtY3/ySiRSoaxC5OozX/1ATvqO5X75r6TjjPx+lPKsJ11A==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-linux-x64-musl/-/binding-linux-x64-musl-0.149.0.tgz", - "integrity": "sha512-F3iGtmHwRZa9OCQ43ccod3tQpfWaPiUGRSCjMV7EJK7qWsGqp8fgMxIUIRip/iEXBodIQ9iq4bA4vszhwohRkA==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-openharmony-arm64/-/binding-openharmony-arm64-0.149.0.tgz", - "integrity": "sha512-+DYaxAGwHkKVIf1+zRS3is8ay2ZADfreYRhLLJ7CbvJqmpE4tjJoIIqjcWmZnRIhZK2+u9GDOfV17byr0nitbw==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.149.0.tgz", - "integrity": "sha512-F0x4PSnABQzrqjUBQgh5NOCj0uJnRkgeQoULsVADpS0DdKCO4qNIF8PABjAzmx1hl/6Mg/Cs07s5bvTfiRFOUw==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.149.0.tgz", - "integrity": "sha512-z5Idox/U/jAR5I+uCBgcEK49I0fXsA2+BaQ58xeKl//BDG4tFYnFSBBg24z/PaouDqXJHAi8koimLReFDwoG+A==", - "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.149.0", - "resolved": "https://registry.npmjs.org/@oxc-transform-react/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.149.0.tgz", - "integrity": "sha512-g3v1prVeSrseqsRRU44lL8V64yWBkRxcdrY5j80b5OxUjFv643qXv80n1JcS4iH3RbqQylfJFldginKo8XOsIQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, "node_modules/@oxfmt/binding-android-arm-eabi": { "version": "0.74.0", "resolved": "https://registry.npmjs.org/@oxfmt/binding-android-arm-eabi/-/binding-android-arm-eabi-0.74.0.tgz", @@ -7259,40 +6911,6 @@ "regex-recursion": "^6.0.2" } }, - "node_modules/oxc-transform-react": { - "version": "0.149.0", - "resolved": "https://registry.npmjs.org/oxc-transform-react/-/oxc-transform-react-0.149.0.tgz", - "integrity": "sha512-ab3dxcPtkDSfIR9tNdxHUtmpdL0lhHndsBD9IUAU5BxtJtwGG/85NnRzs2f2KwouNkHl7caSswMLQeUvw3FERw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/sponsors/oxc-project" - }, - "optionalDependencies": { - "@oxc-transform-react/binding-android-arm-eabi": "0.149.0", - "@oxc-transform-react/binding-android-arm64": "0.149.0", - "@oxc-transform-react/binding-darwin-arm64": "0.149.0", - "@oxc-transform-react/binding-darwin-x64": "0.149.0", - "@oxc-transform-react/binding-freebsd-x64": "0.149.0", - "@oxc-transform-react/binding-linux-arm-gnueabihf": "0.149.0", - "@oxc-transform-react/binding-linux-arm-musleabihf": "0.149.0", - "@oxc-transform-react/binding-linux-arm64-gnu": "0.149.0", - "@oxc-transform-react/binding-linux-arm64-musl": "0.149.0", - "@oxc-transform-react/binding-linux-ppc64-gnu": "0.149.0", - "@oxc-transform-react/binding-linux-riscv64-gnu": "0.149.0", - "@oxc-transform-react/binding-linux-riscv64-musl": "0.149.0", - "@oxc-transform-react/binding-linux-s390x-gnu": "0.149.0", - "@oxc-transform-react/binding-linux-x64-gnu": "0.149.0", - "@oxc-transform-react/binding-linux-x64-musl": "0.149.0", - "@oxc-transform-react/binding-openharmony-arm64": "0.149.0", - "@oxc-transform-react/binding-win32-arm64-msvc": "0.149.0", - "@oxc-transform-react/binding-win32-ia32-msvc": "0.149.0", - "@oxc-transform-react/binding-win32-x64-msvc": "0.149.0" - } - }, "node_modules/oxfmt": { "version": "0.74.0", "resolved": "https://registry.npmjs.org/oxfmt/-/oxfmt-0.74.0.tgz", diff --git a/package.json b/package.json index 0e781b8..e3270d9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "@types/react-dom": "^19.2.3", "@void/md": "1.3.0", "@void/react": "1.3.0", - "oxc-transform-react": "^0.149.0", "typescript": "^7.0.2", "vite": "npm:@voidzero-dev/vite-plus-core@^1.3.0", "vite-plus": "^1.3.0", diff --git a/vite.config.ts b/vite.config.ts index 1dba9b8..d4084ff 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,7 +8,7 @@ import { voidMarkdown } from "@void/md/plugin"; const testing = process.env.VITEST === "true"; export default defineConfig({ - plugins: testing ? [] : [voidPlugin(), voidReact({ react: { compiler: true } }), voidMarkdown()], + plugins: testing ? [] : [voidPlugin(), voidReact(), voidMarkdown()], test: { include: ["src/**/*.test.ts"], },