I'm using angular 11 with scss. I'm serving the app using ng serve --aot
command. It watches the files and compile the app after every change. When there are errors, the CLI detect the it and display the error. After I fix it, it recompiles the files and serves the app.
However, sometimes when there are scss errors, the CLI doesn't detect the changes I make in order to fix the error, and I have to cancel the serve command and rerun it.
For example:
I had an error because I forgot to import a scss file that contained the definition of a variable I used. The CLI showed me the error:
I fixed the error and saved the file, but the CLI didn't recompile the files. I had to press ctrl+c
to cancel the ng-serve command and rerun it, and it worked.
It also happens when I make small changes in SCSS files, like adding "background color" and before I write the color itself, VS code adds ; to the line, creating an error ( because the line is : background-color: ;
). After fixing it, the CLI doesn't detect the changes.
Any idea why it doesn't detect the changes I make? It happens only in scss errors. when I have TS errors, it detects the fixes perfectly.