fix(@angular-devkit/build-angular): serve assets #28795
Merged
+92
−8
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.
Turns out the test for asset serving didn't actually test asset serving because of a missing
whenStable()
- it always succeeded, even with random filenames. This change adds a custom middleware to serve our static files since it seemed easier (and more predictable) than to try to map theassets
concept to Karma'sfiles
+proxy
logic.One side effect of adding the middleware is that we don't actually need the Karma
files
anymore with the exception of any files that we'd want to include on page load. I don't touch that part here because it will be cleaner to change it when also addressing the naming collisions between spec files.Fixes #28754
P.S.: Currently the first commit is from a different PR (#28794), I'm planning to rebase after landing it.