Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
  • Loading branch information
JLHwung and nicolo-ribaudo committed Jul 6, 2023
1 parent e638c08 commit d115802
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cache.js
Expand Up @@ -13,6 +13,7 @@ const zlib = require("zlib");
const crypto = require("crypto");
const { promisify } = require("util");
const { readFile, writeFile, mkdir } = require("fs/promises");
const findCacheDirP = import("find-cache-dir");

const transform = require("./transform");
// Lazily instantiated when needed
Expand Down Expand Up @@ -168,7 +169,7 @@ module.exports = async function (params) {
directory = params.cacheDirectory;
} else {
if (defaultCacheDirectory === null) {
const findCacheDir = (await import("find-cache-dir")).default;
const { default: findCacheDir } = await findCacheDirP;
defaultCacheDirectory =
findCacheDir({ name: "babel-loader" }) || os.tmpdir();
}
Expand Down

0 comments on commit d115802

Please sign in to comment.