-
Notifications
You must be signed in to change notification settings - Fork 12k
ng serve does not watch for all types of changes to all asset types #7763
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
Comments
The way we watch assets changed with #7600, so this bug is likely related. Will have to investigate. |
@filipesilva is there a way to specify which files are being watched at the moment? I encounter similar problems with own made directories as well as the assets directory. It would be nice to get additional configuration options for this. I also encounter that the watch command does not correctly trigger (most of the time) on |
Facing a similar issue on CLI 1.4.9 |
I have a similar issue where I have /assets/i18n/*.json files and they don't seem to be watched :( |
Any workaround? |
@egervari , Same here. I faced that problem after the upgrade from Angular 4 to 5. |
Same here, I'm on the following:
Workaround, The following code is in my controller.js file,
Hope this helps :D |
Thanks for reporting this issue. This issue was originally reported a long time ago and since then we've had many releases, one of which might have addressed this problem. Please update to the most recent Angular CLI version. If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
Win 8.1
Repro steps.
ng serve
assets
dirng serve
does not recompileThe 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:
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/
andassets/data/
. I've tested in the sub directories as well as the rootassets
directory.The text was updated successfully, but these errors were encountered: