This repository was archived by the owner on Aug 7, 2021. It is now read-only.
chore: fix liveSync of html files in Angular apps #845
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In case you change
.html
file in Angular application, duringtns run <platform> --bundle
, the application will be restarted and an error will be shown.This happens as in some cases, the
getCompiledFile
method from Angular compiler does not throw an error when it is unable to find a file, but instead it returns an object with empty outputText and array of errors (errorDependencies).Fix the liveSync in these cases by checking the result of the Angular compiler and fallback to non-platform specific file in the mentioned case.
PR Checklist
What is the current behavior?
Unable to use LiveSync in Angular applications.
What is the new behavior?
LiveSync works in Angular applications.
Fixes/Implements/Closes #[Issue Number].