Skip to content

Commit 8b51597

Browse files
fixup! fix(@angular/build): restore font stylesheet caching
1 parent e1412cb commit 8b51597

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/angular/build/src/utils/index-file/inline-fonts.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { createHash } from 'node:crypto';
1010
import { mkdir, readFile, rm, writeFile } from 'node:fs/promises';
1111
import { type Agent, get as httpsGet } from 'node:https';
12-
import { dirname, join } from 'node:path';
12+
import { join } from 'node:path';
1313
import { NormalizedCachedOptions } from '../normalize-cache';
1414
import { htmlRewritingStream } from './html-rewriting-stream';
1515

@@ -253,9 +253,9 @@ export class InlineFontsProcessor {
253253
);
254254
});
255255

256-
if (cacheFile) {
256+
if (cacheFile && this.cachePath) {
257257
try {
258-
await mkdir(dirname(cacheFile), { recursive: true });
258+
await mkdir(this.cachePath, { recursive: true });
259259
const dataHash = createHash(CONTENT_HASH_ALGORITHM).update(data).digest('hex');
260260
await writeFile(cacheFile, dataHash + data);
261261
} catch {}

0 commit comments

Comments
 (0)