react-redux-typescript-boilerplate
react-redux-typescript-boilerplate copied to clipboard
[HOW] React Hot Loader integrating
This package is awesome!
I would like to apply React Hot Loader
in my project. But I config same as you but still not working.
Tell me if I missing
webpack.config.js
// about plugins
// 1st Remove new webpack.HotModuleReplacementPlugin(),
// 2nd about devServer
devServer: {
hot: true,
inline: true,
},
// 3rd about module
module: {
rules: [
//...
{
test: /\.(ts|tsx)?$/,
include: appPath.appSrc,
use: [
{
loader: 'babel-loader',
options: { plugins: ['react-hot-loader/babel'] }
},
{
loader: require.resolve('ts-loader'),
options: {
// disable type checker - we will use it in fork plugin
transpileOnly: true,
},
},
],
},
],
App.js
// 4th import hot
export default hot<any>(module)(AppConfig)