Skip to content

Commit e9cc370

Browse files
DEV CI
1 parent ac8ec97 commit e9cc370

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/jest-transform/src/ScriptTransformer.ts

+2
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ class ScriptTransformer {
462462
const {transformer, transformerConfig = {}} =
463463
this._getTransformer(filename) ?? {};
464464
const cacheFilePath = this._getFileCachePath(filename, content, options);
465+
createDirectory(path.dirname(cacheFilePath));
465466
const sourceMapPath = `${cacheFilePath}.map`;
466467
// Ignore cache if `config.cache` is set (--no-cache)
467468
const code = this._config.cache ? readCodeCacheFile(cacheFilePath) : null;
@@ -522,6 +523,7 @@ class ScriptTransformer {
522523
content,
523524
options,
524525
);
526+
createDirectory(path.dirname(cacheFilePath));
525527
const sourceMapPath = `${cacheFilePath}.map`;
526528
// Ignore cache if `config.cache` is set (--no-cache)
527529
const code = this._config.cache ? readCodeCacheFile(cacheFilePath) : null;

0 commit comments

Comments
 (0)