measuredco / puck

The visual editor for React
https://puckeditor.com
MIT License
5.02k stars 274 forks source link

Switch to conditional RSC imports #504

Closed chrisvxd closed 1 week ago

chrisvxd commented 3 months ago

Following this convention on RFC 0227, we should consider using conditional imports that many frameworks (including Next.js) will support OOTB when rendering server components.

This will mean that users no longer need to explicitly import the rsc module when using Puck: https://puckeditor.com/docs/integrating-puck/server-components

This may become irrelevant as part of #255, which may result in the Render component from the core Puck package being RSC-friendly.

chrisvxd commented 3 months ago

CC @4leite wanted to track this following our discussion back in March.

Related: #498

chrisvxd commented 1 week ago

Closed by #588