npm / copy-webpack-plugin
copy-webpack-plugin
What changed in copy-webpack-plugin 5 to 14, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
30 breaking4 new APIs and options3 behavior and defaults2 tooling8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcopy-webpack-plugin 141 changes
Breaking changes 1
The minimum supported Node.js version is now 20.9.0.
copy-webpack-plugin 132 changes
Breaking changes 1
The concurrency option is now limited to files.
Fixes and other changes 1
The order of patterns provided by the developer is now respected.
copy-webpack-plugin 88 changes
Breaking changes 7
[emoji] was removed.
[ext] no longer requires a preceding dot; change [name].[ext] to [name][ext].
[folder] was removed.
[fullhash] now uses the build hash, as in webpack, instead of the file content hash; use [contenthash] for the content hash.
[hash] now uses the build hash, as in webpack, instead of the file content hash; use [contenthash] for the content hash.
This placeholder syntax is no longer supported; configure output.hashDigest, output.hashDigestLength, and output.hashFunction instead.
[N] was removed; use the to option as a function instead.
New APIs and options 1
A priority option was added.
copy-webpack-plugin 76 changes
Breaking changes 5
The
cacheTransformoption was removed; use theObjecttype of thetransformoption instead.Empty filtered paths now throw an error; this behavior can be disabled with the
noErrorOnMissingoption.The
flattenoption was removed; use the[name].[ext]value for thetooption instead.The
transformPathoption was removed; use theFunctiontype of thetooption instead.The minimum supported webpack version is now 5.
Tooling 1
The plugin migrated to the
compilation.hooks.processAssetshook.
copy-webpack-plugin 619 changes
Breaking changes 12
The cache option was renamed to cacheTransform; when cacheTransform is an object, it should contain only directory and keys properties.
The plugin now accepts a single object containing patterns and options instead of separate constructor arguments.
The copyUnmodified option was removed without a replacement.
The from option now accepts only a string; glob and dot settings move to globOptions.
The ignore option is removed in favor of globOptions.ignore.
logLever was removed in favor of infrastructureLogging.level.
A missing file now produces an error instead of a warning.
The minimum supported Node.js version is 10.13.
The global context option was removed in favor of pattern.context.
The global ignore option was removed in favor of pattern.globOptions.ignore.
The test option was removed in favor of transformPath.
Version 2 of webpack-dev-server is no longer supported.
New APIs and options 3
The cacheTransform option now supports a directory option.
A concurrency option is now available.
A noErrorOnMissing option is now available.
Behavior and default changes 1
The plugin migrates to the compilation.additionalAssets hook.
Tooling 1
The plugin migrated to the webpack built-in logger.
Fixes and other changes 2
Asset size handling was fixed.
A fix addresses persisting assets between rebuilds.
copy-webpack-plugin 511 changes
Breaking changes 4
An error is thrown if
fromis an empty string.The
debugoption was renamed tologLevel, which accepts the string valuestrace,debug,info,warn,error, andsilent.Support for Node.js versions below 6.9 was dropped.
Support for webpack versions below 4 was dropped.
Behavior and default changes 2
The plugin supports copying nested directories and files in symlinks.
The plugin emits a warning instead of an error when a file doesn't exist.
Fixes and other changes 5
The plugin handles new files added in watch mode when using
glob.[contenthash]is handled as a template.Only modified files are copied when patterns have different
tovalues and the samecontext.Path segment separation is normalized so mixed
/and\separators cause no problems.The plugin prototype changed so the correct plugin name can be obtained.