import dva from 'dva' ; import createHistory from 'history/createBrowserHistory' ; import './global.less' ; const app = dva ( { history : createHistory ( ) , onError : ( err ) => { console . log ( 'err' , err ) ; } , } ) ; const models = [ 'user' ] ; models . forEach ( ( item ) => app . model ( require ( `./models/${ item }.ts` ) . default ) ) ; app . router ( require ( './router/index.tsx' ) . default ) ; app . start ( '#sites' ) ;