Skip to content

Commit c0b76e3

Browse files
committed
fix(@angular/build): separate Vite cache by project
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
1 parent 475340a commit c0b76e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular/build/src/builders/dev-server/vite-server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ export async function setupServer(
574574
join(serverOptions.workspaceRoot, `.angular/vite-root`, serverOptions.buildTarget.project),
575575
);
576576

577-
const cacheDir = join(serverOptions.cacheOptions.path, 'vite');
577+
const cacheDir = join(serverOptions.cacheOptions.path, serverOptions.buildTarget.project, 'vite');
578578
const configuration: InlineConfig = {
579579
configFile: false,
580580
envFile: false,

0 commit comments

Comments
 (0)