2017-09-05 10:24:13 +08:00
|
|
|
import './plugin'
|
2017-07-05 14:10:06 +08:00
|
|
|
import React from 'react'
|
|
|
|
import ReactDOM from 'react-dom'
|
2017-07-24 11:04:51 +08:00
|
|
|
import App from './Application'
|
2017-07-10 20:30:11 +08:00
|
|
|
import { Provider } from 'react-redux'
|
2017-08-08 14:25:33 +08:00
|
|
|
import createStore from './reducer/create';
|
2017-08-22 10:43:40 +08:00
|
|
|
import './styles/theme.less'
|
2017-09-13 17:09:06 +08:00
|
|
|
import './styles/common.scss';
|
2017-08-08 14:25:33 +08:00
|
|
|
const store = createStore();
|
2017-08-23 20:41:47 +08:00
|
|
|
if (process.env.NODE_ENV === 'production') {
|
2017-08-23 18:24:29 +08:00
|
|
|
ReactDOM.render(
|
|
|
|
<Provider store={store}>
|
|
|
|
<div>
|
|
|
|
<App />
|
|
|
|
</div>
|
|
|
|
</Provider>,
|
|
|
|
document.getElementById('yapi')
|
|
|
|
)
|
2017-08-23 20:41:47 +08:00
|
|
|
} else {
|
|
|
|
const DevTools = require('./containers/DevTools/DevTools.js')
|
2017-08-23 18:24:29 +08:00
|
|
|
ReactDOM.render(
|
|
|
|
<Provider store={store}>
|
|
|
|
<div>
|
|
|
|
<App />
|
2017-08-23 20:41:47 +08:00
|
|
|
<DevTools />
|
2017-08-23 18:24:29 +08:00
|
|
|
</div>
|
|
|
|
</Provider>,
|
|
|
|
document.getElementById('yapi')
|
|
|
|
)
|
|
|
|
}
|