diff --git a/AGENTS.md b/AGENTS.md index 3b66901ca..4979bfb74 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,7 +18,7 @@ The app has its own git repository (InformaticsMatters/squonk2-data-manager-ui), ## Commands -- `pnpm dev` — dev server (Turbopack). +- `pnpm dev` — dev server (Turbopack, which the React Compiler's Rust port requires). - `pnpm build` — production build. Run the separate strict TypeScript and ESLint commands too. - `pnpm generate:client:data-manager` / `pnpm generate:client:account-server` — regenerate one local OpenAPI client from its ignored input in `openapi/`. - `pnpm generate:clients` — transactionally regenerate both local OpenAPI clients. diff --git a/next.config.mjs b/next.config.mjs index a7a3dc581..df18edfe2 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -40,6 +40,16 @@ let nextConfig = { : /** @type {import("next").NextConfig["output"]} */ (process.env.OUTPUT_TYPE), generateBuildId: process.env.GIT_SHA ? () => process.env.GIT_SHA ?? null : undefined, typescript: { ignoreBuildErrors: true }, + // Every rule the compiler's own diagnostics ship as is enabled in `eslint.config.mjs`, so the + // tree is kept in the shape the compiler can actually compile rather than silently skipping + // components it cannot. + reactCompiler: true, + experimental: { + // The native Rust port of the React Compiler, which runs inside Turbopack rather than as a + // Babel pass through Node. This is why the build is Turbopack rather than webpack: the option + // errors outright under webpack. + turbopackRustReactCompiler: true, + }, // reactStrictMode: true, // TODO: Blocked by @rjsf Form using UNSAFE_componentWillReceiveProps pageExtensions: ["js", "ts", "jsx", "tsx", "mdx"], // The redesign is a clean cutover: a removed route is the ordinary not-found, so this diff --git a/package.json b/package.json index 3df90265f..5c877a008 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,9 @@ "test:smoke": "playwright test --config=playwright.smoke.config.ts", "test:debug": "pnpm test:acceptance:headed", "test:ci": "pnpm test", - "analyze": "ANALYZE=true next build --webpack", - "analyze:server": "BUNDLE_ANALYZE=server next build --webpack", - "analyze:browser": "BUNDLE_ANALYZE=browser next build --webpack" + "analyze": "ANALYZE=true next build", + "analyze:server": "BUNDLE_ANALYZE=server next build", + "analyze:browser": "BUNDLE_ANALYZE=browser next build" }, "lint-staged": { "*.@(js|ts|tsx)": [