babel register cache: make sure the cache file's directory exists
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import { sync as mkdirpSync } from "mkdirp";
|
||||
import homeOrTmp from "home-or-tmp";
|
||||
import pathExists from "path-exists";
|
||||
|
||||
@@ -22,6 +23,7 @@ export function save() {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
mkdirpSync(path.dirname(FILENAME));
|
||||
fs.writeFileSync(FILENAME, serialised);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user