Skip to content

Conversation

@alan-agius4
Copy link
Collaborator

A transient error can occur during ng serve when Vite's dependency pre-bundling is triggered for Angular locale data, showing an error like [vite] (ssr) Error when evaluating SSR module...: There is a new version of the pre-bundle....

Previously, the angular:locale/data: namespace was left unresolved by the build process for the dev server. This caused Vite to treat the namespace as a new dependency, triggering a pre-bundling step that led to the error.

With this change, esbuild now resolves the angular:locale/data: namespace and replaces it with the direct module import path. While the module is still treated as an external dependency, providing the explicit path prevents Vite from unnecessarily triggering a new pre-bundling phase. This resolves the transient error.

Closes #31498

(cherry picked from commit c0c05174889967ba6e623ba40337f44ed1a1a219)

@alan-agius4 alan-agius4 requested a review from clydin October 17, 2025 08:22
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Oct 17, 2025
@alan-agius4 alan-agius4 force-pushed the vite/locale-patch branch 2 times, most recently from 8cff408 to f379b79 Compare October 17, 2025 14:44
A transient error can occur during `ng serve` when Vite's dependency pre-bundling is triggered for Angular locale data, showing an error like `[vite] (ssr) Error when evaluating SSR module...: There is a new version of the pre-bundle...`.

Previously, the `angular:locale/data:` namespace was left unresolved by the build process for the dev server. This caused Vite to treat the namespace as a new dependency, triggering a pre-bundling step that led to the error.

With this change, esbuild now resolves the `angular:locale/data:` namespace and replaces it with the direct module import path. While the module is still treated as an external dependency, providing the explicit path prevents Vite from unnecessarily triggering a new pre-bundling phase. This resolves the transient error.

Closes angular#31498

(cherry picked from commit c0c05174889967ba6e623ba40337f44ed1a1a219)
@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 Oct 17, 2025
@alan-agius4 alan-agius4 merged commit 8cdda11 into angular:20.3.x Oct 17, 2025
30 checks passed
@alan-agius4 alan-agius4 deleted the vite/locale-patch branch October 17, 2025 15:13
@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 Nov 17, 2025
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/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants