react scripts start - hot reload are too slow?

Viewed 1628

I am using create-react-app to create my react projects boilerplates but recently launching my projects with npm start is too slow and most recently hot reloading is slow take from 5 - 15 secs to rebuild the page after any change especially when rebuilding after an error.

I really don't know much about webpack, after some search i found that problem can be from webpack or webpack-dev-server but i don't know much about them so i don't know from where should i move to solve this issue?

1 Answers

If you're developing a React project in a Windows Subsystem for Linux 2 (WSL2) environment, it's especially important that you work within the WSL2 directory structure for optimal I/O. For example, you'll want to put the project in "~/repos/my-project", not "/mnt/c/Users/my-username/repos/my-project". They aren't the same location. You can confirm this by running "explorer.exe ." from the terminal.

Related