I am working on a setup where I use Craft CMS GraphQL API, Sapper and Svelte to create a site on Netlify. This works fine and the site is already live using this setup, although I am having trouble when I try to make implement the live preview feature of Craft CMS to work using Netlify Dev. I am able to make this feature to work without running
netlify dev. But that means that I can’t set this and test this using lambda functions locally.
I realise that the crash occurs and seems to be related when I embed the site url within an iframe.
This is crucial on how Craft CMS implement its live preview on a headless website. Basically the CMS embeds my url in a iframe, sends me a token and with that I can retrieve the data that I am currently editing.
screenshot of the crash in my bash