This noticeably improves performance in the admin panel, for example
when there are multiple richtext editors on one page (& likely
performance in other areas too, though I mainly tested rich text).
The babel plugin currently only optimizes files with a 'use client'
directive at the top - thus we have to make sure to add use client
wherever possible, even if it's imported by a parent client component.
There's one single component that broke when it was compiled using the
React compiler (it stopped being reactive and failed one of our admin
e2e tests):
150808f608
opting out of it completely fixed that issue
Fixes https://github.com/payloadcms/payload/issues/7366
177 lines
3.9 KiB
JSON
177 lines
3.9 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"baseUrl": ".",
|
|
"declaration": true,
|
|
"declarationMap": true,
|
|
"target": "esnext",
|
|
"module": "NodeNext",
|
|
"moduleResolution": "NodeNext",
|
|
"allowJs": true,
|
|
"checkJs": false,
|
|
"esModuleInterop": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"jsx": "preserve",
|
|
"lib": [
|
|
"dom",
|
|
"dom.iterable",
|
|
"esnext"
|
|
],
|
|
"noEmit": true,
|
|
"outDir": "./dist",
|
|
"resolveJsonModule": true,
|
|
"rootDir": ".",
|
|
"skipLibCheck": true,
|
|
"sourceMap": true,
|
|
"strict": false,
|
|
"types": [
|
|
"jest",
|
|
"node",
|
|
"@types/jest"
|
|
],
|
|
"incremental": true,
|
|
"isolatedModules": true,
|
|
"plugins": [
|
|
{
|
|
"name": "next"
|
|
}
|
|
],
|
|
"paths": {
|
|
"@payload-config": [
|
|
"./test/_community/config.ts"
|
|
],
|
|
"@payloadcms/live-preview": [
|
|
"./packages/live-preview/src"
|
|
],
|
|
"@payloadcms/live-preview-react": [
|
|
"./packages/live-preview-react/src/index.ts"
|
|
],
|
|
"@payloadcms/live-preview-vue": [
|
|
"./packages/live-preview-vue/src/index.ts"
|
|
],
|
|
"@payloadcms/ui": [
|
|
"./packages/ui/src/exports/client/index.ts"
|
|
],
|
|
"@payloadcms/ui/shared": [
|
|
"./packages/ui/src/exports/shared/index.ts"
|
|
],
|
|
"@payloadcms/ui/scss": [
|
|
"./packages/ui/src/scss.scss"
|
|
],
|
|
"@payloadcms/ui/scss/app.scss": [
|
|
"./packages/ui/src/scss/app.scss"
|
|
],
|
|
"@payloadcms/next/*": [
|
|
"./packages/next/src/exports/*.ts"
|
|
],
|
|
"@payloadcms/richtext-lexical/client": [
|
|
"./packages/richtext-lexical/src/exports/client/index.ts"
|
|
],
|
|
"@payloadcms/richtext-lexical/generateComponentMap": [
|
|
"./packages/richtext-lexical/src/utilities/generateComponentMap.tsx"
|
|
],
|
|
"@payloadcms/richtext-slate/client": [
|
|
"./packages/richtext-slate/src/exports/client/index.ts"
|
|
],
|
|
"@payloadcms/richtext-slate/generateComponentMap": [
|
|
"./packages/richtext-slate/src/generateComponentMap.tsx"
|
|
],
|
|
"@payloadcms/plugin-seo/client": [
|
|
"./packages/plugin-seo/src/exports/client.ts"
|
|
],
|
|
"@payloadcms/plugin-stripe/client": [
|
|
"./packages/plugin-stripe/src/exports/client.ts"
|
|
],
|
|
"@payloadcms/plugin-search/client": [
|
|
"./packages/plugin-search/src/exports/client.ts"
|
|
],
|
|
"@payloadcms/plugin-form-builder/client": [
|
|
"./packages/plugin-form-builder/src/exports/client.ts"
|
|
],
|
|
"@payloadcms/next": [
|
|
"./packages/next/src/exports/*"
|
|
]
|
|
}
|
|
},
|
|
"exclude": [
|
|
"dist",
|
|
"build",
|
|
"temp",
|
|
"node_modules"
|
|
],
|
|
"composite": true,
|
|
"references": [
|
|
{
|
|
"path": "./packages/create-payload-app"
|
|
},
|
|
{
|
|
"path": "./packages/db-mongodb"
|
|
},
|
|
{
|
|
"path": "./packages/db-postgres"
|
|
},
|
|
{
|
|
"path": "./packages/drizzle"
|
|
},
|
|
{
|
|
"path": "./packages/graphql"
|
|
},
|
|
{
|
|
"path": "./packages/live-preview"
|
|
},
|
|
{
|
|
"path": "./packages/live-preview-react"
|
|
},
|
|
{
|
|
"path": "./packages/live-preview-vue"
|
|
},
|
|
{
|
|
"path": "./packages/next"
|
|
},
|
|
{
|
|
"path": "./packages/payload"
|
|
},
|
|
{
|
|
"path": "./packages/plugin-cloud-storage"
|
|
},
|
|
{
|
|
"path": "./packages/plugin-cloud"
|
|
},
|
|
{
|
|
"path": "./packages/plugin-form-builder"
|
|
},
|
|
{
|
|
"path": "./packages/plugin-nested-docs"
|
|
},
|
|
{
|
|
"path": "./packages/plugin-redirects"
|
|
},
|
|
{
|
|
"path": "./packages/plugin-search"
|
|
},
|
|
{
|
|
"path": "./packages/plugin-seo"
|
|
},
|
|
{
|
|
"path": "./packages/plugin-stripe"
|
|
},
|
|
{
|
|
"path": "./packages/richtext-slate"
|
|
},
|
|
{
|
|
"path": "./packages/richtext-lexical"
|
|
},
|
|
{
|
|
"path": "./packages/translations"
|
|
},
|
|
{
|
|
"path": "./packages/ui"
|
|
}
|
|
],
|
|
"include": [
|
|
"app",
|
|
"next-env.d.ts",
|
|
".next/types/**/*.ts",
|
|
"scripts/**/*.ts"
|
|
]
|
|
}
|