I raised a very similar problem once they trimmed this support
There is a workaround that works without setting app.debugMode()
, though.
If you add at the end of main.js
(newline)/* nosourcemap */(end of file)
then, the sourcemaps won’t be trimmed, even if debug mode is not enabled
I even made an esbuild
plugin that adds this magic string on npm run dev
Maybe you can consider adding this magic string within your Hot Reload
plugin. I can send a corresponding PR, if you are interested.