diff --git a/CHANGELOG.md b/CHANGELOG.md index acf4f2dd..b7359884 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [6.3.2](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.3.1...v6.3.2) (2020-11-19) + + +### Bug Fixes + +* watching directories ([#558](https://github.com/webpack-contrib/copy-webpack-plugin/issues/558)) ([7b58fd9](https://github.com/webpack-contrib/copy-webpack-plugin/commit/7b58fd9a89e9b29578b30cb3119453e78e036ec2)) + ### [6.3.1](https://github.com/webpack-contrib/copy-webpack-plugin/compare/v6.3.0...v6.3.1) (2020-11-13) diff --git a/package-lock.json b/package-lock.json index aad4e915..2f9df27a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "copy-webpack-plugin", - "version": "6.3.1", + "version": "6.3.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 79b03314..8e79c612 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "copy-webpack-plugin", - "version": "6.3.1", + "version": "6.3.2", "description": "Copy files && directories with webpack", "license": "MIT", "repository": "webpack-contrib/copy-webpack-plugin", diff --git a/src/index.js b/src/index.js index 488d53c5..1b9bc430 100644 --- a/src/index.js +++ b/src/index.js @@ -351,8 +351,8 @@ class CopyPlugin { force: pattern.force, }; - // If this came from a glob, add it to the file dependencies - if (pattern.fromType === "glob") { + // If this came from a glob or dir, add it to the file dependencies + if (pattern.fromType === "dir" || pattern.fromType === "glob") { compilation.fileDependencies.add(absoluteFilename); logger.debug(`added '${absoluteFilename}' as a file dependency`); diff --git a/test/__snapshots__/CopyPlugin.test.js.snap b/test/__snapshots__/CopyPlugin.test.js.snap index b37e63fc..6f28f0a0 100644 --- a/test/__snapshots__/CopyPlugin.test.js.snap +++ b/test/__snapshots__/CopyPlugin.test.js.snap @@ -176,6 +176,10 @@ exports[`CopyPlugin logging should logging when "from" is a directory: logs 1`] Object { "logs": Array [ "added './fixtures/directory' as a context dependency", + "added './fixtures/directory/.dottedfile' as a file dependency", + "added './fixtures/directory/directoryfile.txt' as a file dependency", + "added './fixtures/directory/nested/deep-nested/deepnested.txt' as a file dependency", + "added './fixtures/directory/nested/nestedfile.txt' as a file dependency", "begin globbing './fixtures/directory/**/*'...", "determined './fixtures/directory' is a directory", "determined that './fixtures/directory/.dottedfile' should write to '.dottedfile'",