feat!: next.js 15, react 19, react compiler support (#6429)
**BREAKING:** - bumps minimum required next.js version from `14.3.0-canary.68` to `15.0.0-rc.0` - bumps minimum required react and react-dom versions to `19.0.0 `(`19.0.0-rc-f994737d14-20240522` should be used) - `@types/react` and `@types/react-dom` have to be bumped to `npm:types-react@19.0.0-beta.2` using overrides and pnpm overrides, if you want correct types. You can find an example of this here: https://github.com/payloadcms/payload/pull/6429/files#diff-10cb9e57a77733f174ee2888587281e94c31f79e434aa3f932a8ec72fa7a5121L32 ## Issues - Bunch of todos for our react-select package which is having type issues. Works fine, just type issues. Their type defs are importing JSX in a weird way, we likely just have to wait until they fix them in a future update.
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
"syntax": "typescript",
|
||||
"tsx": true,
|
||||
"dts": true
|
||||
},
|
||||
"transform": {
|
||||
"react": {
|
||||
"runtime": "automatic",
|
||||
"pragmaFrag": "React.Fragment",
|
||||
"throwIfNamespace": true,
|
||||
"development": false,
|
||||
"useBuiltins": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"module": {
|
||||
|
||||
@@ -44,14 +44,15 @@
|
||||
"@payloadcms/ui": "workspace:*",
|
||||
"@types/is-hotkey": "^0.1.10",
|
||||
"@types/node": "20.12.5",
|
||||
"@types/react": "18.3.2",
|
||||
"@types/react": "npm:types-react@19.0.0-beta.2",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-beta.2",
|
||||
"payload": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@payloadcms/translations": "workspace:*",
|
||||
"@payloadcms/ui": "workspace:*",
|
||||
"payload": "workspace:*",
|
||||
"react": "^18.0.0 || ^19.0.0"
|
||||
"react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.20.2"
|
||||
@@ -67,5 +68,9 @@
|
||||
"main": "./dist/index.js",
|
||||
"registry": "https://registry.npmjs.org/",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"overrides": {
|
||||
"@types/react": "npm:types-react@19.0.0-beta.2",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-beta.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"emitDeclarationOnly": true,
|
||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
||||
"jsx": "react"
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
||||
Reference in New Issue
Block a user