richtext-lexical: lazy import React components to prevent client-only code from leaking into the server (#4290)
⚠️ @payloadcms/richtext-lexical
Most important: If you are updating @payloadcms/richtext-lexical to v0.4.0 or higher, you will HAVE to update payload to the latest version as well. If you don't update it, payload likely won't start up due to validation errors. It's generally good practice to upgrade packages prefixed with @payloadcms/ together with payload and keep the versions in sync.
@payloadcms/richtext-slate is not affected by this.
Every single property in the Feature interface which accepts a React component now no longer accepts a React component, but a function which imports a React component instead. This is done to ensure no unnecessary client-only code is leaked to the server when importing Features on a server.
Here's an example migration:
Old:
import { BlockIcon } from '../../lexical/ui/icons/Block'
...
Icon: BlockIcon,
New:
// import { BlockIcon } from '../../lexical/ui/icons/Block' // <= Remove this import
...
</tr></table>
richtext-lexical: lazy import React components to prevent client-only code from leaking into the server (#4290)
⚠️ @payloadcms/richtext-lexical
Most important: If you are updating @payloadcms/richtext-lexical to v0.4.0 or higher, you will HAVE to update payload to the latest version as well. If you don't update it, payload likely won't start up due to validation errors. It's generally good practice to upgrade packages prefixed with @payloadcms/ together with payload and keep the versions in sync.
@payloadcms/richtext-slate is not affected by this.
Every single property in the Feature interface which accepts a React component now no longer accepts a React component, but a function which imports a React component instead. This is done to ensure no unnecessary client-only code is leaked to the server when importing Features on a server.
Here's an example migration:
Old:
import { BlockIcon } from '../../lexical/ui/icons/Block'
...
Icon: BlockIcon,
New:
// import { BlockIcon } from '../../lexical/ui/icons/Block' // <= Remove this import
...
Icon: () =>
</tr></table>
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps payload from 2.0.14 to 2.4.0.
Release notes
Sourced from payload's releases.
... (truncated)
Changelog
Sourced from payload's changelog.
... (truncated)
Commits
eefcd88
chore(release): payload/2.4.0 [skip ci]217cc1f
docs: update CONTRIBUTING.md (#4401)7af8f29
feat(richtext-lexical): Link & Relationship Feature: field-level configurable...5f2cd1a
docs: fix example link (#4394)dbaecda
fix(db-postgres): sorting on a not-configured field throws error (#4382)cf9a370
fix: handles null upload field values (#4397)4b5453e
fix: simplifies query validation and fixes nested relationship fields (#4391)5de347f
feat(richtext-lexical)!: lazy import React components to prevent client-only ...80ef18c
fix(templates/website): removes unused form builder plugin from deps (#4385)912abe2
docs(plugin-nested-docs): clarifies that relationships are intra-collection (...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show