When using my Electron app on Windows (problem doesn't appear on Mac) I started getting this error for some external URLs that are loaded into a <webview> tag:
Uncaught SyntaxError: Unexpected token ... (which I believe refers to spread syntax).
It's hard for me to see a solution because of the fact it's an external URL. https://instagram.com is an example of as site that produces this error in my console.
This is my webview
<webview src="https://www.instagram.com/" preload="./custom_scripts/preload-manager.js" allowpopups="" webpreferences="webSecurity=no" partition="persist:default"></webview>
Using the Instagram example, this is the script that is throwing the error: https://www.instagram.com/static/bundles/es6/ConsumerCommons.js/c86cd1388003.js.
Here is a snippet of that script that contains the position of the error
const {
allowStale: c,
onCached: v
} = {
allowStale: !1,
...s
}, p = l[o];