I "inherited" a create-react-app
on which I am updating some functionality. I am familiar with JS and can code in React, but I do not know much about webpack, npm, hot reload or the rest of the process that eases the life of the developers.
Unfortunately, when trying to debug this app, the debugger doesn't stop on breakpoints, neither in Chrome nor in Firefox. This answer suggests that the problem appears when a script appears twice. And indeed, in my firefox, one of the pages is loaded twice:
Obviously they cannot both exist on this in the same directory. But for some reason, the browser displays and probably runs both.
How can I identify where they come from and disable it, in order to regain control over my debugger? I believe it has something to do with webpack, hot reloading and source maps.
Edit: If I restart firefox, then all is well, there is only one copy of the source. However, after I modify the file and the page automatically refreshes, I again end up with 2 copies. So it is clearly something dubious about this hot reloading ...