Skip to content

Commit d4f4718

Browse files
test: debug
1 parent 1295472 commit d4f4718

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/index.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ class CopyPlugin {
229229
const { hashDigest, hashDigestLength, hashFunction, hashSalt } =
230230
outputOptions;
231231
const hash = compiler.webpack.util.createHash(
232-
/** @type {string} */ (hashFunction),
232+
/** @type {string} */
233+
(hashFunction),
233234
);
234235

235236
if (hashSalt) {
@@ -446,9 +447,9 @@ class CopyPlugin {
446447
context: pattern.context,
447448
absoluteFilename,
448449
})
449-
: path.normalize(
450-
typeof pattern.to !== "undefined" ? pattern.to : "",
451-
);
450+
: typeof pattern.to !== "undefined"
451+
? path.normalize(pattern.to)
452+
: "";
452453
const toType =
453454
pattern.toType ||
454455
(template.test(to)
@@ -476,6 +477,11 @@ class CopyPlugin {
476477
path.relative(compiler.context, absoluteFilename),
477478
);
478479

480+
// eslint-disable-next-line no-console
481+
console.log(sourceFilename);
482+
// eslint-disable-next-line no-console
483+
console.log(path.relative(compiler.context, absoluteFilename));
484+
479485
// If this came from a glob or dir, add it to the file dependencies
480486
if (fromType === "dir" || fromType === "glob") {
481487
compilation.fileDependencies.add(absoluteFilename);

0 commit comments

Comments
 (0)