index.js 558 Bytes
Newer Older
afc163's avatar
afc163 committed
1
import 'babel-polyfill';
2 3
import dva from 'dva';
import 'moment/locale/zh-cn';
afc163's avatar
afc163 committed
4
import FastClick from 'fastclick';
5
import './g2';
6
import './rollbar';
7
import onError from './error';
nikogu's avatar
nikogu committed
8
// import browserHistory from 'history/createBrowserHistory';
9 10 11
import './index.less';
// 1. Initialize
const app = dva({
nikogu's avatar
nikogu committed
12
  // history: browserHistory(),
13
  onError,
14 15 16 17 18
});

// 2. Plugins
// app.use({});

WhatAKitty's avatar
WhatAKitty committed
19 20
// 3. Register global model
app.model(require('./models/global'));
21 22

// 4. Router
afc163's avatar
afc163 committed
23
app.router(require('./router'));
24 25 26

// 5. Start
app.start('#root');
afc163's avatar
afc163 committed
27
FastClick.attach(document.body);