Skip to content

Commit

Permalink
fix: use react compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Oct 29, 2024
1 parent 70c8e6d commit 46ca180
Show file tree
Hide file tree
Showing 5 changed files with 1,345 additions and 1,128 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports = {
'react/prop-types': 'off',
'react-hooks/exhaustive-deps': 'error', // Checks effect dependencies
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-compiler/react-compiler': 'warn', // Set to error once existing warnings are fixed
'react-compiler/react-compiler': 'error',
'react/no-unescaped-entities': 'off',
'no-restricted-imports': [
'error',
Expand Down
3 changes: 3 additions & 0 deletions package.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ export default defineConfig({
noImplicitBrowsersList: 'off',
},
tsconfig: 'tsconfig.dist.json',
babel: {reactCompiler: true},
// @ts-expect-error - add `target` to `pkg-utils` types
reactCompilerOptions: {target: '18'},
})
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sanity/ui",
"version": "2.8.10",
"version": "2.8.11-canary.0",
"keywords": [
"sanity",
"ui",
Expand Down Expand Up @@ -110,6 +110,7 @@
"@sanity/icons": "^3.4.0",
"csstype": "^3.1.3",
"framer-motion": "11.0.8",
"react-compiler-runtime": "19.0.0-beta-6fc168f-20241025",
"react-refractor": "^2.2.0",
"use-effect-event": "^1.0.2"
},
Expand All @@ -121,7 +122,7 @@
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@juggle/resize-observer": "^3.4.0",
"@sanity/pkg-utils": "^6.10.9",
"@sanity/pkg-utils": "^6.11.6",
"@sanity/prettier-config": "^1.0.2",
"@sanity/semantic-release-preset": "^5.0.0",
"@sanity/ui-workshop": "^2.0.16",
Expand Down Expand Up @@ -152,6 +153,7 @@
"@types/refractor": "^3.4.1",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"babel-plugin-react-compiler": "beta",
"commitizen": "^4.3.0",
"cypress": "^13.13.2",
"cypress-real-events": "^1.13.0",
Expand All @@ -163,7 +165,7 @@
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-compiler": "0.0.0-experimental-a97cca1-20240529",
"eslint-plugin-react-compiler": "beta",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-storybook": "^0.8.0",
"http-server": "^14.1.1",
Expand Down
Loading

0 comments on commit 46ca180

Please sign in to comment.