Skip to content

Commit 05963eb

Browse files
authoredMar 22, 2019
fix: add fallback to transform cache directory (#361)
1 parent eaf4306 commit 05963eb

File tree

3 files changed

+796
-614
lines changed

3 files changed

+796
-614
lines changed
 

‎package-lock.json

+788-605
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,16 @@
5555
"devDependencies": {
5656
"@babel/cli": "^7.1.5",
5757
"@babel/core": "^7.1.6",
58-
"@babel/polyfill": "^7.0.0",
5958
"@babel/preset-env": "^7.1.6",
6059
"@commitlint/cli": "^7.5.2",
6160
"@commitlint/config-conventional": "^7.5.0",
6261
"@webpack-contrib/defaults": "^3.0.5",
6362
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
6463
"babel-jest": "^24.1.0",
6564
"cross-env": "^5.1.3",
66-
"del": "^3.0.0",
65+
"del": "^4.0.0",
6766
"del-cli": "^1.1.0",
68-
"enhanced-resolve": "^3.4.1",
67+
"enhanced-resolve": "^4.1.0",
6968
"eslint": "^5.13.0",
7069
"eslint-plugin-import": "^2.8.0",
7170
"eslint-plugin-prettier": "^3.0.0",
@@ -94,8 +93,7 @@
9493
{
9594
"targets": {
9695
"node": "6.9.0"
97-
},
98-
"useBuiltIns": "usage"
96+
}
9997
}
10098
]
10199
]

‎src/postProcessPattern.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'path';
2-
2+
import os from 'os';
33
import crypto from 'crypto';
44

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

5454
if (pattern.cache) {
5555
if (!globalRef.cacheDir) {
56-
globalRef.cacheDir = findCacheDir({
57-
name: 'copy-webpack-plugin',
58-
});
56+
globalRef.cacheDir =
57+
findCacheDir({
58+
name: 'copy-webpack-plugin',
59+
}) || os.tmpdir();
5960
}
6061

6162
const cacheKey = pattern.cache.key

0 commit comments

Comments
 (0)
Please sign in to comment.