Skip to content

Commit

Permalink
fix: add fallback to transform cache directory
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Mar 22, 2019
1 parent eaf4306 commit e8faf57
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/postProcessPattern.js
@@ -1,5 +1,5 @@
import path from 'path';

import os from 'os';
import crypto from 'crypto';

import loaderUtils from 'loader-utils';
Expand Down Expand Up @@ -53,9 +53,10 @@ export default function postProcessPattern(globalRef, pattern, file) {

if (pattern.cache) {
if (!globalRef.cacheDir) {
globalRef.cacheDir = findCacheDir({
name: 'copy-webpack-plugin',
});
globalRef.cacheDir =
findCacheDir({
name: 'copy-webpack-plugin',
}) || os.tmpdir();
}

const cacheKey = pattern.cache.key
Expand Down

0 comments on commit e8faf57

Please sign in to comment.