import 'core-js/es6/map';
import 'core-js/es6/set';
import 'raf/polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import {AppContainer} from 'react-hot-loader';
import { Provider } from 'mobx-react';


// mobx store
import stores from './stores/index'

import {LocaleProvider} from 'antd';

import AppRouter from './routers';

import  'babel-polyfill';
import promise from 'es6-promise';
import "../mock/index.js"

import './index.less'
import Global from './components/Common-Library/Global'

Global.init() 

window.SUCCESS = '00000'

if (process.env.NODE_ENV === 'development') {
    ReactDOM.render(
        <AppContainer>
            <Provider {...stores}>
                    <AppRouter/>
            </Provider>
        </AppContainer>
        ,
        document.getElementById('root')
    );
    if (module.hot) {
        module.hot.accept(
            './routers', () => ReactDOM.render(AppRouter)
        )
    }
    console.log('----------------');
    console.log("process.env.NODE_ENV 的值是(index.js)：" + process.env.NODE_ENV);
}else {
    ReactDOM.render(
            <Provider {...stores}>
                    <AppRouter/>
            </Provider>
        ,
        document.getElementById('root')
    );
}
