import '@babel/polyfill';
import 'url-polyfill';
import dva from "dva";
import "./rollbar";
import { log } from './utils/utils';
// import createHistory from 'history/createBrowserHistory';
const createHistory = require("history").createBrowserHistory;
// const createHistory = require("history").createHashHistory;
import "./index.less";
window.log = log;
// 1. Initialize
const app = dva({
  history: createHistory()
});

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

// 3. Register global model
app.model(require("./models/global").default);

// 4. Router
app.router(require("./router").default);

// 5. Start
app.start("#root");

export default app._store; // eslint-disable-line
