ng serve - recompiles on server files change
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.2.0 node: 8.0.0 os: win32 x64 @angular/animations: 4.2.6 @angular/common: 4.2.6 @angular/compiler: 4.2.6 @angular/core: 4.2.6 @angular/forms: 4.2.6 @angular/http: 4.2.6 @angular/platform-browser: 4.2.6 @angular/platform-browser-dynamic: 4.2.6 @angular/platform-server: 4.2.6 @angular/router: 4.2.6 @angular/cli: 1.2.0 @angular/compiler-cli: 4.2.6 @angular/language-service: 4.2.6
Repro steps.
Edit and save any file (e.g. readme). Ng serve will recompile, page will be reloaded. Changing root in angular.json does not help (in attempt to confine watcher scope to a certain directory).
Desired functionality.
There should be some way to avoid recompilation. For example, if I have public folder in my root directory where I keep uploaded files, then on every file upload page is reloaded. Moving public folder outside project directory is not a good option (there might be some stuff which I want to be committed) as well as running ng serve --live-reload=false
ng serve --watch false is not working?
@KrystianRos the desired functionality is to prevent recompilation when files not related to angular 2 app are changed (or at least provide a way to exclude certain folders/files from watcher's scope). The way I see it, only files specified in assets, scripts, styles and their dependencies must be watched. Now everything in project directory is watched (including server files).
Closing as the original issue has been reopened: https://github.com/angular/angular-cli/issues/2425
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.