Skip to content

Commit 11a83ab

Browse files
cephalizationmikeldking
authored andcommitted
feat: Add react compiler
Enable compiler, skipping errors Upgrade to stable 1.0.0 compiler new lock file
1 parent edefb82 commit 11a83ab

File tree

6 files changed

+40
-250
lines changed

6 files changed

+40
-250
lines changed

app/.eslintrc-legacy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
extends: [
88
"eslint:recommended",
99
"plugin:react/recommended",
10+
"plugin:react-hooks/recommended",
1011
"plugin:react/jsx-runtime",
1112
"plugin:@typescript-eslint/recommended",
1213
"plugin:storybook/recommended",

app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"@types/relay-runtime": "^19.0.3",
9393
"@types/three": "^0.180.0",
9494
"@vitejs/plugin-react": "^4.7.0",
95+
"babel-plugin-react-compiler": "1.0.0",
9596
"babel-plugin-relay": "^20.1.1",
9697
"chromatic": "^11.29.0",
9798
"cpy-cli": "^5.0.0",

app/pnpm-lock.yaml

Lines changed: 31 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/pages/dataset/__generated__/datasetLoaderQuery.graphql.ts

Lines changed: 0 additions & 243 deletions
This file was deleted.

app/src/pages/playground/fetchPlaygroundPrompt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {
4343
} from "@phoenix/utils/promptUtils";
4444

4545
import {
46-
fetchPlaygroundPromptQuery,
46+
fetchPlaygroundPromptQuery as fetchPlaygroundPromptQueryType,
4747
fetchPlaygroundPromptQuery$data,
4848
PromptMessageRole,
4949
} from "./__generated__/fetchPlaygroundPromptQuery.graphql";
@@ -577,7 +577,7 @@ export const fetchPlaygroundPrompt = async ({
577577
promptVersionId?: string | null;
578578
tagName?: string | null;
579579
}) => {
580-
return fetchQuery<fetchPlaygroundPromptQuery>(
580+
return fetchQuery<fetchPlaygroundPromptQueryType>(
581581
RelayEnvironment,
582582
fetchPlaygroundPromptQuery,
583583
{

app/vite.config.mts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export default defineConfig(() => {
1313
// disable react's built-in 300ms suspense fallback timer
1414
// without this build plugin we see a 300ms delay on most UI interactions
1515
reactFallbackThrottlePlugin(),
16-
react(),
16+
react({
17+
babel: {
18+
plugins: [["babel-plugin-react-compiler", { panicThreshold: "none" }]],
19+
},
20+
}),
1721
relay,
1822
lezer(),
1923
];

0 commit comments

Comments
 (0)