main.js 776 B

1234567891011121314151617181920212223242526272829303132333435
  1. import '@babel/polyfill';
  2. import React from 'react';
  3. import ReactDOM from 'react-dom';
  4. import { Provider } from 'react-redux';
  5. import '../images/favicon.ico';
  6. import configureStore from './stores/configureStore';
  7. import Fonts from './fonts';
  8. import zhCN from 'antd/es/locale/zh_CN';
  9. import { Tabel } from 'antd';
  10. import moment from 'moment';
  11. import 'antd/dist/antd.css';
  12. moment.locale('zh-cn');
  13. // import '../styles/icon.js';
  14. const store = configureStore();
  15. function renderApp() {
  16. const App = require('./components/app').default;
  17. ReactDOM.render(
  18. (
  19. <Provider store={store}>
  20. <Fonts />
  21. <App />
  22. </Provider>
  23. ), document.getElementById('app')
  24. );
  25. }
  26. renderApp();
  27. if (module.hot) {
  28. module.hot.accept('./components/app', renderApp);
  29. }