From b11ac88692ad7a8765b0b15e6d7a882d171ffe81 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 18 Jul 2017 07:19:02 +0900 Subject: Require any modules after loading polyfill in entry points (#4231) app/javascript/mastodon/main.js delayed the execution of modules, but other entry points didn't. That leads to failure in executing modules, which requires those polyfills. Strictly enforce the rule to require any modules after loading polyfill in entry points. --- app/javascript/packs/application.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/javascript/packs/application.js') diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 63c5d6272..116632dea 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -1,6 +1,7 @@ -import main from '../mastodon/main'; import loadPolyfills from '../mastodon/load_polyfills'; -loadPolyfills().then(main).catch(e => { +loadPolyfills().then(() => { + require('../mastodon/main').default(); +}).catch(e => { console.error(e); }); -- cgit