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.
This commit is contained in:
Akihiko Odaki authored and Eugen Rochko committed 2017-07-18 00:19:02 +02:00
1 parent 681c33d1f4
commit b11ac88692
4 files changed
+49 -50

No files matched your search

+3 -2
View File
@@ -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);
});