Cache linker cache files in memory (#9794)

This commit is contained in:
Lucas Hansen
2018-04-02 16:37:08 -07:00
committed by Ben Newman
parent 4e1bcb0043
commit 8d320497d6

View File

@@ -18,6 +18,7 @@ import {cssToCommonJS} from "./css-modules.js";
import Resolver from "./resolver.js";
import {
optimisticStatOrNull,
optimisticReadJsonOrNull,
} from "../fs/optimistic.js";
import { isTestFilePath } from './test-files.js';
@@ -1406,7 +1407,7 @@ export class PackageSourceBatch {
if (cacheFilename) {
let diskCached = null;
try {
diskCached = files.readJSONOrNull(cacheFilename);
diskCached = optimisticReadJsonOrNull(cacheFilename);
} catch (e) {
// Ignore JSON parse errors; pretend there was no cache.
if (!(e instanceof SyntaxError)) {