Skip to content

[HOW] React Hot Loader integrating  #67

@tomzaku

Description

@tomzaku

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions