Client Fixes (#9064)

* fix loading of payments scripts

* improve loading times
This commit is contained in:
Matteo Pagliazzi
2017-09-22 13:29:08 +02:00
committed by GitHub
parent 744090e652
commit f128f3d3cd
7 changed files with 80 additions and 37 deletions

View File

@@ -4,7 +4,9 @@ require('babel-polyfill');
import Vue from 'vue';
import AppComponent from './app';
import { setup as setupAnalytics } from 'client/libs/analytics';
import {
setup as setupAnalytics,
} from 'client/libs/analytics';
import router from './router';
import getStore from './store';
import StoreModule from './libs/store';
@@ -27,11 +29,12 @@ Vue.config.productionTip = IS_PRODUCTION;
Vue.use(i18n, {i18nData: window && window['habitica-i18n']});
Vue.use(StoreModule);
setupAnalytics();
setupAnalytics(); // just create queues for analytics, no scripts loaded at this time
const store = getStore();
export default new Vue({
el: '#app',
router,
store: getStore(),
store,
render: h => h(AppComponent),
});