Tom Kirkpatrick
7 years ago
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
3 changed files with
11 additions and
25 deletions
-
app/containers/Root.js
-
app/index.js
-
webpack.config.renderer.dev.js
|
|
@ -3,6 +3,7 @@ import React from 'react' |
|
|
|
import { Provider, connect } from 'react-redux' |
|
|
|
import { ConnectedRouter } from 'react-router-redux' |
|
|
|
import PropTypes from 'prop-types' |
|
|
|
import { hot } from 'react-hot-loader' |
|
|
|
|
|
|
|
import { |
|
|
|
setConnectionType, |
|
|
@ -243,8 +244,10 @@ Root.propTypes = { |
|
|
|
syncingProps: PropTypes.object.isRequired |
|
|
|
} |
|
|
|
|
|
|
|
export default connect( |
|
|
|
mapStateToProps, |
|
|
|
mapDispatchToProps, |
|
|
|
mergeProps |
|
|
|
)(Root) |
|
|
|
export default hot(module)( |
|
|
|
connect( |
|
|
|
mapStateToProps, |
|
|
|
mapDispatchToProps, |
|
|
|
mergeProps |
|
|
|
)(Root) |
|
|
|
) |
|
|
|
|
|
@ -16,12 +16,6 @@ render( |
|
|
|
|
|
|
|
if (module.hot) { |
|
|
|
module.hot.accept('./containers/Root', () => { |
|
|
|
const NextRoot = require('./containers/Root') // eslint-disable-line global-require
|
|
|
|
render( |
|
|
|
<AppContainer> |
|
|
|
<NextRoot store={store} history={history} /> |
|
|
|
</AppContainer>, |
|
|
|
document.getElementById('root') |
|
|
|
) |
|
|
|
render(<Root store={store} history={history} />, document.getElementById('root')) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
@ -44,11 +44,7 @@ export default merge.smart(baseConfig, { |
|
|
|
|
|
|
|
mode: 'development', |
|
|
|
|
|
|
|
entry: [ |
|
|
|
'react-hot-loader/patch', |
|
|
|
'webpack/hot/only-dev-server', |
|
|
|
path.join(__dirname, 'app/index.js') |
|
|
|
], |
|
|
|
entry: ['webpack/hot/only-dev-server', path.join(__dirname, 'app/index.js')], |
|
|
|
|
|
|
|
output: { |
|
|
|
publicPath: `http://localhost:${port}/dist/` |
|
|
@ -296,14 +292,7 @@ export default merge.smart(baseConfig, { |
|
|
|
}) |
|
|
|
) |
|
|
|
) |
|
|
|
app.use( |
|
|
|
convert( |
|
|
|
history({ |
|
|
|
verbose: true, |
|
|
|
disableDotRule: false |
|
|
|
}) |
|
|
|
) |
|
|
|
) |
|
|
|
app.use(convert(history())) |
|
|
|
}, |
|
|
|
// Start the main process as soon as the server is listening.
|
|
|
|
on: { |
|
|
|