From c56b54eddddd75f1eabfccda5166165d6b44cd82 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 27 Apr 2018 15:12:16 +0100 Subject: [PATCH] Load babel-polyfill in the bundle entry, before index.js --- webpack.config.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 81e0c1794d..2a116f5777 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,12 +8,9 @@ if (!og_image_url) og_image_url = 'https://riot.im/app/themes/riot/img/logos/rio module.exports = { entry: { - main: [ - // Load this first to avoid issues where some imports (namely react) - // potentially before babel-polyfill. - 'babel-polyfill', - ], - "bundle": "./src/vector/index.js", + // Load babel-polyfill first to avoid issues where some imports (namely react) + // are potentially loaded before babel-polyfill. + "bundle": ["babel-polyfill", "./src/vector/index.js"], "indexeddb-worker": "./src/vector/indexeddb-worker.js", // We ship olm.js as a separate lump of javascript. This makes it get