The docu on how to implement the Preview mentions that the following line needs to be added to _documents.
import { apiEndpoint } from "./../sm.json"; // import the endpoint name
const prismicRepoName = /([a-zA-Z0-9-]+)?(\.cdn)?\.prismic\.io/.exec(apiEndpoint)[1] //Regex to get repo ID
NextJS however raises a warning: Should not import the named export 'apiEndpoint' (imported as 'apiEndpoint') from default-exporting module (only default export is available soon)
Obviously i could hardcode the repo name, but ideally i would like to keep this logic but make it future proof. a) Does anyone have already a solution
b) Can Prismic pick this up and update the docu with a future proof solution
Thanks,
Goppi