Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOW] React Hot Loader integrating #67

Open
tomzaku opened this issue Feb 18, 2019 · 0 comments
Open

[HOW] React Hot Loader integrating #67

tomzaku opened this issue Feb 18, 2019 · 0 comments

Comments

@tomzaku
Copy link

tomzaku commented Feb 18, 2019

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant