If you use the internal editor, make a change to a JS file, and hit save, Cocos Creator will recompile, and if you’ve checked the preference “Should Auto-refresh Preview,” the browser window will automatically refresh.
But if you use an External Script Editor (for instance the official one, Visual Studio Code), this doesn’t work. When you change a JS file and hit save, it will not automatically trigger a recompile until Cocos Creator gets focus again.
Maybe this isn’t a bug, maybe this is just a feature you haven’t implemented yet. But I think this should be an option at least. The automatic recompile and auto-refresh preview with the internal editor is really awesome.