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

[Feature request] improve Hot Reload feature #2028

Open
BachiMjavanadze opened this issue Apr 27, 2024 · 0 comments
Open

[Feature request] improve Hot Reload feature #2028

BachiMjavanadze opened this issue Apr 27, 2024 · 0 comments
Labels

Comments

@BachiMjavanadze
Copy link

BachiMjavanadze commented Apr 27, 2024

At the moment, if we want to use the hot reload functionality, then we need to write this to the VSCode settings.json:

"files.autoSave": "afterDelay",

and run this command:

ng serve --open

This functionality is well suited for those cases when we edit html or css but when we write a logic of the app, this is not the optimal option, because during the software development process there is constant and unnecessary compilation of code.

The solution to this problem could be if we write in settings.json this:

"files.autoSave": "onFocusChange",

or even this:

"files.autoSave": "off",

But it's a compromise, why compromise if you don't have to compromise?

There are two solutions; One is a button on the taskbar, how this is done in the Visual Studio IDE 2022

image

and another solution is Flutter extension for VSCode:

Flutter.demo.mp4

As you can see from the video, Flutter developers have not disabled the coolest VSCode feature:

"files.autoSave": "afterDelay"

It would be good if we combine these two methods and do this: let's write again in settings.json:

"files.autoSave": "afterDelay",

then let's create a small menu on the VSCode taskbar:

1

run this command:

ng serve --open

Then, if we select Hot Reload, everything happens as before: the system looks at the changes in the files and compilation occurs instantly but if we select Reload on Click:

2

then compilation occurs only when the Ctrl+S buttons on keyboard (or triangle button on taskbar) are clicked.

So, my request is not only about Hot Reload but smooth switching between Hot Reload and Reload on Click.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant