feat: pre-compile ui and richtext-lexical with react compiler (#7688)
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
This commit is contained in:
@@ -27,30 +27,7 @@
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@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"
|
||||
],
|
||||
"@payload-config": ["./_community/config.ts", "./versions/config.ts"],
|
||||
"@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"
|
||||
]
|
||||
"@payload-config": ["./_community/config.ts"]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
|
||||
Reference in New Issue
Block a user