prismicio / prismic-next

Helpers to integrate Prismic into Next.js apps
https://prismic.io/docs/technologies/nextjs
Apache License 2.0
57 stars 7 forks source link

Use Next.js's `<Script>` component to load the Prismic Toolbar #39

Closed angeloashmore closed 2 years ago

angeloashmore commented 2 years ago

Is your feature request related to a problem? Please describe.

The Prismic Toolbar is currently loaded using @prismicio/react's <PrismicToolbar> component. While this currently works, it results in an extra dependency and is likely less optimal than using Next.js's built-in <script> handling.

Describe the solution you'd like

<PrismicPreview> could replace it's <PrismicToolbar> usage using Next.js's <Script> component directly.

Describe alternatives you've considered

N/A

Additional context

https://nextjs.org/docs/basic-features/script