refactor(@angular/build): migrate to optimizeDeps.rolldownOptions in Vite config#33434
Open
alan-agius4 wants to merge 1 commit into
Open
refactor(@angular/build): migrate to optimizeDeps.rolldownOptions in Vite config#33434alan-agius4 wants to merge 1 commit into
alan-agius4 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request transitions the Vite dev-server dependency optimization configuration from Esbuild to Rolldown, removing the zoneless parameter and introducing rolldownOptions. Feedback highlights a critical issue in the new load hook where virtual modules and query parameters/hashes in module IDs are not handled, which could lead to build failures or skipped compilation. A code suggestion is provided to clean the module IDs before matching and transforming.
2657293 to
22ab38d
Compare
…Vite config Vite now uses Rolldown as the underlying engine to optimize dependencies, rendering `optimizeDeps.esbuildOptions` deprecated. This commit refactors the Vite dev-server config in `@angular/build` to use `optimizeDeps.rolldownOptions` instead. It also updates the custom dependency optimization plugin from the esbuild-specific format to a native Rolldown plugin using the `load` hook, and aligns browser target lowering by pushing `es2016` when Zone.js is present (since Rolldown lacks esbuild-style feature-support flags).
22ab38d to
0c5a271
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Vite now uses Rolldown as the underlying engine to optimize dependencies, rendering
optimizeDeps.esbuildOptionsdeprecated.This commit refactors the Vite dev-server config in
@angular/buildto useoptimizeDeps.rolldownOptionsinstead.It also updates the custom dependency optimization plugin from the esbuild-specific format to a native Rolldown plugin using the
loadhook, and aligns browser target lowering by pushinges2016when Zone.js is present (since Rolldown lacks esbuild-style feature-support flags).