datocms / plugins

Repository providing samples using the Plugins SDK
MIT License
33 stars 47 forks source link

[Web Previews] Do not reload the plugin on each save if only one of the front-ends are generating errors #96

Open fcisio opened 1 year ago

fcisio commented 1 year ago

Hi, this is an enhancement request.

I was getting an issue where the side-by-side preview would fully reload and reset to the published link (instead of draft) on every content save (see #94).

Since then I isolated the issue and realized that it was caused by a secondary front-end link that was failing.

ScreenShot 2023-08-16 at 8 51 56 PM

That front-end link refers to "localhost" so the side-by-side preview would only work properly when my dev server was running.

So the enhancement request would be to isolate the errors from each front-end link and make sure they do not impact the side-by-side preview.

As an alternative, errors could be ignored if the front-end host is "localhost".

Hope this is comprehensive, thanks.