From 5ed31c55c210db0cdbd91293bbe3eda5b6cb99ce Mon Sep 17 00:00:00 2001 From: ivan-aksamentov Date: Tue, 29 Sep 2020 22:07:02 +0200 Subject: [PATCH] fix: polyfill Promise to avoid crashes in old browsers Resolves #1213 This adds `Promise` polyfill before async entrypoint. This is "solution 2" in the linked issue. See there for more details. --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 4b17d8124..bcf12434a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -109,7 +109,7 @@ const generateConfig = ({extensionPath, devMode=false, customOutputPath, analyze plugins.push(new BundleAnalyzerPlugin()); } - const entry = devMode ? ["webpack-hot-middleware/client", "./src/indexAsync"] : ["./src/indexAsync"]; + const entry = devMode ? ["webpack-hot-middleware/client", "./src/indexAsync"] : ["core-js/es/promise", "./src/indexAsync"]; /* Where do we want the output to be saved? * For development we use the (virtual) "devel" directory