-
|
I always get an error when I try to static render content from So how do you handle Rich Text contenet being rendered through NextJS static generation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hey @Aichnerc there's actually a fairly simple fix for that—use The reason you're seeing errors is when you try to use |
Beta Was this translation helpful? Give feedback.
Hey @Aichnerc there's actually a fairly simple fix for that—use
@payloadcms/richtext-lexical/reactinstead. The /react subpath export gives you only what you need for rendering.The reason you're seeing errors is when you try to use
@payloadcms/richtext-lexicaldirectly you're pulling in editor code (including browser-only APIs) which breaks in static gen