You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
721 B
34 lines
721 B
import '@babel/polyfill';
|
|
import 'url-polyfill';
|
|
import dva from 'dva';
|
|
|
|
import createHistory from 'history/createHashHistory';
|
|
// user BrowserHistory
|
|
// import createHistory from 'history/createBrowserHistory';
|
|
import createLoading from 'dva-loading';
|
|
import 'moment/locale/zh-cn';
|
|
import FastClick from 'fastclick';
|
|
import './rollbar';
|
|
|
|
import './index.less';
|
|
// 1. Initialize
|
|
const app = dva({
|
|
history: createHistory(),
|
|
});
|
|
|
|
// 2. Plugins
|
|
app.use(createLoading());
|
|
|
|
// 3. Register global model
|
|
app.model(require('./models/global').default);
|
|
|
|
// 4. Router
|
|
app.router(require('./router').default);
|
|
|
|
// 5. Start
|
|
app.start('#root');
|
|
|
|
|
|
FastClick.attach(document.body);
|
|
|
|
export default app._store; // eslint-disable-line
|
|
|