Skip to content

Commit 05485ed

Browse files
committed
fix(@angular/build): ensure com.chrome.devtools.json is consistently served after initial run
Previously, `com.chrome.devtools.json` was generated and served correctly on the first run, but subsequent `ng serve` runs failed to serve the file unless the Angular cache was cleared. This change addresses the inconsistency.
1 parent 2ee9042 commit 05485ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/angular/build/src/tools/vite/middlewares/chrome-devtools-middleware.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export function createChromeDevtoolsMiddleware(
3838
if (!devtoolsConfig) {
3939
// We store the UUID and re-use it to ensure Chrome does not repeatedly ask for permissions when restarting the dev server.
4040
try {
41-
const devtoolsConfig = readFileSync(devtoolsConfigPath, 'utf-8');
41+
devtoolsConfig = readFileSync(devtoolsConfigPath, 'utf-8');
42+
4243
const devtoolsConfigJson: DevToolsJson = JSON.parse(devtoolsConfig);
4344
assert.equal(projectRoot, devtoolsConfigJson?.workspace.root);
4445
} catch {

0 commit comments

Comments
 (0)