Fix "SharedArrayBuffer will require cross-origin isolation"

This is a workaround for React v16 while we don't upgrade to v17

See https://github.com/facebook/create-react-app/issues/10474
This commit is contained in:
Deluan 2021-04-28 21:42:17 -04:00 committed by Joe Stump
parent 35aa640cfe
commit f4e005bc5e
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -33,6 +33,11 @@
<script>
window.__APP_CONFIG__ = "{{.AppConfig}}"
</script>
<!-- Issue workaround for React v16. -->
<script>
// See https://github.com/facebook/react/issues/20829#issuecomment-802088260
if (!crossOriginIsolated) SharedArrayBuffer = ArrayBuffer;
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>