This repository has been archived on 2026-11-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
grisefest-2017-web/src/client-bootstrap.js
T
2017-04-09 12:48:07 +02:00

43 lines
921 B
JavaScript

/**
* Polyfills and shims
*/
require('es5-shim/es5-shim');
require('es5-shim/es5-sham');
require('babel-polyfill');
/**
* Use bluebird for better error handling in development
*/
if (__DEVELOPMENT__) {
/**
* Use bluebird for promises
*/
window.Promise = require('bluebird');
/**
* Suppress warnings of runaway Promises.
* Bug when used together with Babel causes
* harmless and non-applicative (but annyoing) warnings..
*/
Promise.config({
warnings: false
});
/**
* Globally handle unhandled promise rejections
*/
window.addEventListener('unhandledrejection', function(e) {
e.preventDefault();
throw e.detail.reason;
});
}
/**
* Initialize and render the client app
*/
require('aurora-core/dist/render/client')({
getRoute: require('./services/get-route-config'),
getModule: require('./modules/get-module'),
isVisible: require('./utils/is-visible'),
});