Skip to content
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

Multiple asset fixes for Vite and the application builder in watch mode #29274

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

alan-agius4
Copy link
Collaborator

fix(@angular/build): trigger browser reload on asset changes with Vite dev server

Ensures the Vite-based development server automatically reloads the browser when asset files are modified.

Closes #26141

fix(@angular/build): remove deleted assets from output during watch mode

This commit ensures that assets deleted from the source are also removed from the output directory while in watch mode. Previously, deleted assets could persist in the output folder, potentially causing inconsistencies or outdated files to be served. This fix improves the accuracy of the build output by maintaining synchronization between the source and the output directory during development.

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Jan 8, 2025
@alan-agius4 alan-agius4 force-pushed the assets-watch-removal branch from 5b4a5ef to 6239f22 Compare January 8, 2025 10:35
@alan-agius4 alan-agius4 requested a review from clydin January 8, 2025 10:56
@alan-agius4 alan-agius4 force-pushed the assets-watch-removal branch 4 times, most recently from 3cd0ae9 to 3791541 Compare January 8, 2025 14:40
@alan-agius4 alan-agius4 closed this Jan 8, 2025
@alan-agius4 alan-agius4 force-pushed the assets-watch-removal branch from 3791541 to ebc3cc8 Compare January 8, 2025 14:40
@alan-agius4 alan-agius4 reopened this Jan 8, 2025
@alan-agius4 alan-agius4 force-pushed the assets-watch-removal branch 2 times, most recently from 65894c4 to 17e2a53 Compare January 8, 2025 18:05
@alan-agius4 alan-agius4 added target: rc This PR is targeted for the next release-candidate and removed target: minor This PR is targeted for the next minor release labels Jan 8, 2025
This commit ensures that assets deleted from the source are also removed from the output directory while in watch mode. Previously, deleted assets could persist in the output folder, potentially causing inconsistencies or outdated files to be served. This fix improves the accuracy of the build output by maintaining synchronization between the source and the output directory during development.
…e dev server

Ensures the Vite-based development server automatically reloads the browser when asset files are modified.

Closes angular#26141
@alan-agius4 alan-agius4 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 Jan 10, 2025
@alan-agius4 alan-agius4 merged commit 87cfefb into angular:main Jan 10, 2025
31 checks passed
@alan-agius4 alan-agius4 deleted the assets-watch-removal branch January 10, 2025 19:08
@alan-agius4
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @angular/build target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vite is not reloading on asset only changes
2 participants