From 5aa2858f4b2dae544a4160421ebe0a799faf429d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 4 Feb 2021 11:31:07 +0100 Subject: [PATCH] fix need for unsafe-eval in CSP header --- scripts/build.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build.js b/scripts/build.js index a099126..94a98ab 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -69,6 +69,10 @@ async function buildHtml(assets) { const doc = cheerio.load(devHtml); doc("link[rel=stylesheet]").attr("href", assets.resolve(`bundle.css`)); const mainScripts = [ + // this is needed to avoid hitting https://github.com/facebook/regenerator/issues/378 + // which prevents the whole bundle to load, as our CSP headers don't allow unsafe-eval + // and I preferred this over disabling strict mode for the whole bundle + ``, ``, `` ];