-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
Win 8.1
$ ng -v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.4.2
node: 6.9.4
os: win32 x64
@angular/common: 4.3.5
@angular/compiler: 4.3.5
@angular/core: 4.3.5
@angular/forms: 4.3.5
@angular/http: 4.3.5
@angular/platform-browser: 4.3.5
@angular/platform-browser-dynamic: 4.3.5
@angular/router: 4.3.5
@angular/cli: 1.4.2
@angular/compiler-cli: 4.3.5
typescript: 2.2.2
Repro steps.
- Create an app with the CLI
- Run with
ng serve - Rename or delete an item in the
assetsdir - Alternatively, overwrite an image with a different one (same name)
- Observe that
ng servedoes not recompile
The log given by the failure.
Desired functionality.
Any changes to any files (at least in the asset dir) should kick off the ng serve compile process.
Mention any other details that might be useful.
Currently, adding a new file or updating a file seems to kick the process off, but renaming, deleting or moving any type of file, or updating / overwriting an image isn't detected. This doesn't seem to be a problem for all binary types - if you create an MS Publisher document, for example, add a slide then save, the process kicks off.
I did quite a lot of extensive testing, but in the end I couldn't come to any conclusion as to what specific file operations kick off the compile process - even the behaviour above isn't 100% consistent.
I can't find any details on how to configure this in the documentation, other than being able to specify globs in the app.assets array in the .angular-cli.json. Mine is as follows:
"assets": [
"assets",
"favicon.ico",
"Web.Config"
]
I've also tried using assets/**/*, and the glob pattern described in the docs here, with no consistent results.
I have multiple directories inside assets; assets/img/ and assets/data/. I've tested in the sub directories as well as the root assets directory.