Skip to content

Commit

Permalink
fix(@angular/build): separate Vite cache by project
Browse files Browse the repository at this point in the history
Previously, Vite prebundled dependencies were stored in a shared directory across all projects, which caused the `_metadata.json` files to be overwritten. This resulted in undefined behavior, such as re-optimizing dependencies on each run when multiple projects were present in the workspace. Additionally, it introduced conflicts when running multiple `ng serve` processes simultaneously.

Closes #28536
  • Loading branch information
alan-agius4 committed Oct 1, 2024
1 parent 475340a commit c0b76e3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ export async function setupServer(
join(serverOptions.workspaceRoot, `.angular/vite-root`, serverOptions.buildTarget.project),
);

const cacheDir = join(serverOptions.cacheOptions.path, 'vite');
const cacheDir = join(serverOptions.cacheOptions.path, serverOptions.buildTarget.project, 'vite');
const configuration: InlineConfig = {
configFile: false,
envFile: false,
Expand Down

0 comments on commit c0b76e3

Please sign in to comment.