Skip to content

fix(@angular-devkit/build-angular): serve assets #28795

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

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

jkrems
Copy link
Contributor

@jkrems jkrems commented Nov 5, 2024

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 the assets concept to Karma's files+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.

@jkrems jkrems added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels Nov 5, 2024
@jkrems jkrems requested a review from clydin November 5, 2024 21:44
@jkrems jkrems force-pushed the jk-fix-karma-assets branch 2 times, most recently from f20fd0c to 9f42575 Compare November 5, 2024 22:06
@jkrems jkrems added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 5, 2024
@jkrems jkrems merged commit 1278112 into angular:main Nov 5, 2024
32 checks passed
@jkrems
Copy link
Contributor Author

jkrems commented Nov 5, 2024

The changes were merged into the following branches: main, 19.0.x

@jkrems jkrems deleted the jk-fix-karma-assets branch November 5, 2024 23:59
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: @angular-devkit/build-angular target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Karma builder ignores assets directory with "builderMode: application"
2 participants