diff --git a/site/scripts/check-compiler.mjs b/site/scripts/check-compiler.mjs index 2ea58a8e8c..e28c1f9496 100644 --- a/site/scripts/check-compiler.mjs +++ b/site/scripts/check-compiler.mjs @@ -16,10 +16,11 @@ import { transformSync } from "@babel/core"; // Resolve the site/ directory (ESM equivalent of __dirname + ".."). const siteDir = new URL("..", import.meta.url).pathname; -// Only AgentsPage is currently opted in to React Compiler. Add new -// directories here as more pages are migrated. +// Directories opted in to React Compiler. Keep this list in sync with +// the include filter in vite.config.mts. const targetDirs = [ "src/pages/AgentsPage", + "src/pages/AIBridgePage", ]; const skipPatterns = [".test.", ".stories.", ".jest."]; diff --git a/site/vite.config.mts b/site/vite.config.mts index 22722659b3..d739b4b6d7 100644 --- a/site/vite.config.mts +++ b/site/vite.config.mts @@ -17,6 +17,7 @@ const compilerPreset = reactCompilerPreset(); compilerPreset.rolldown.filter = { ...compilerPreset.rolldown.filter, id: { + // Keep in sync with targetDirs in scripts/check-compiler.mjs. include: [/src\/pages\/AgentsPage\//, /src\/pages\/AIBridgePage\//], }, };