You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Next.js supports a runtime called Edge Runtime built upon Web APIs, unlike the default Node.js-based runtime.
Some @prismicio/next APIs are incompatible with Edge Runtime, such as setPreviewData(). setPreviewData() reads an API Route request and sets a Prismic-specific Preview Data property, but the function does not currently support reading a Web API Request object as used in Edge Runtime.
Describe the solution you'd like
The existing @prismicio/next APIs could be made universal to run in both the default non-Edge Runtime and Edge Runtime environments. This can probably be done using duck typing to test the received data.
Describe alternatives you've considered
🚫 Provide a different set of helpers specific to a runtime.
🚫 Only support one runtime.
Additional context
None.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Next.js supports a runtime called Edge Runtime built upon Web APIs, unlike the default Node.js-based runtime.
Some
@prismicio/next
APIs are incompatible with Edge Runtime, such assetPreviewData()
.setPreviewData()
reads an API Route request and sets a Prismic-specific Preview Data property, but the function does not currently support reading a Web APIRequest
object as used in Edge Runtime.Describe the solution you'd like
The existing
@prismicio/next
APIs could be made universal to run in both the default non-Edge Runtime and Edge Runtime environments. This can probably be done using duck typing to test the received data.Describe alternatives you've considered
Additional context
None.
The text was updated successfully, but these errors were encountered: