Skip to content

fix(@angular/build): isolate Vite cache per build configuration in dev server#32944

Open
maruthang wants to merge 1 commit intoangular:mainfrom
maruthang:fix-31700-vite-cache-conflict
Open

fix(@angular/build): isolate Vite cache per build configuration in dev server#32944
maruthang wants to merge 1 commit intoangular:mainfrom
maruthang:fix-31700-vite-cache-conflict

Conversation

@maruthang
Copy link
Copy Markdown
Contributor

@maruthang maruthang commented Apr 6, 2026

Summary

  • Running two ng serve instances for the same project with different configurations (e.g., different locales) caused "504 Outdated Optimize Dep" errors
  • Both instances shared the same Vite optimizer cache directory (<cache>/<project>/vite), so when one instance updated the cache, the other detected stale metadata
  • The fix includes the build configuration name in the cache path (<cache>/<project>/vite/<configuration>), isolating each instance's cache

Closes #31700

Test plan

  • Run two ng serve instances with different configurations concurrently — no 504 errors
  • Single ng serve instance still works correctly
  • Cache directory is properly created with configuration suffix

…v server

Running two ng serve instances for the same project with different
configurations (e.g., different locales) caused "504 Outdated Optimize Dep"
errors because both instances shared the same Vite optimizer cache directory.

The fix includes the build configuration name in the Vite cache directory
path, preventing cache conflicts between concurrent dev server instances.

Closes angular#31700
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Vite dev server configuration to include the build configuration in the cache path. This change prevents potential conflicts when running multiple dev server instances with different configurations. I have no further feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running two ng serve instances (same project, different configurations) causes “504 Outdated Optimize Dep” errors in Angular CLI 20.3.8

1 participant