#React Compiler with TSS

7 messages · Page 1 of 1 (latest)

stiff rose
#

Hello,
I'm trying to set up the new react compiler with TSS@alpha but it seems like not to have an affect.
That's my vite.config.ts

import tailwindcss from "@tailwindcss/vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

const ReactCompilerConfig = {
    target: "19",
};

export default defineConfig({
    ssr: {
        noExternal: ["@erquhart/convex-better-auth"],
    },
    plugins: [
        tsconfigPaths(),
        tailwindcss(),
        tanstackStart({
            react: {
                babel: {
                    plugins: [
                        ["babel-plugin-react-compiler", ReactCompilerConfig],
                    ],
                },
            },
        }),
    ],
});

Also added "babel-plugin-react-compiler": "19.1.0-rc.2"

#

No errors outputed in the console

autumn glacier
#

what would expect to happen?

stiff rose
#

Maybe I phrased my question wrong

#

More likely, how can I check, that it works?

#

because with react scanner, I still see like rerenderings of sub components happening after changing non related props

white valve
#

an easy way to check if its working in general and in a specific component is to open the react devtools. they will show a Memo badge on all components that have compiler optimizations applied