Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Other users have had the same issues with copy webpack plugin here. There doesn't seem to be a consensus on what the solution is, and the issue is still open. I went into the files and am attaching the relevant code block here. It shows how globOptions is passed into globby.
Looking at the code block, the plugin constructs a glob Path, and then passes that and the
globOptions
as is intoglobby
. globby then usesfast-glob
to add theglobOptions.ignore
strings. Over the course of last month,globby
andfast-glob
both had one PR merged addressingignore
.globby
merged a PR that addressed its default handling ofignore
options.fast-glob
merged a PR that addressed misuse of theignore
options.I started by setting
noErrorOnMissing
tofalse
and ranpnpm start
withUSING_NPM
set to true. I found 18 errors were raised, all with the same message as this:When
USING_NPM
is set to false, the same errors were raised, but 29 this time.This means our default
working
solution raises errors that aren't raised because we setnoErrorOnMissing
totrue
.The change I made involved just tweaking the
ignore
glob we pass in such that the compilation errors went back to 18 errors.The fix as is will be fine, it will revert the behavior of copy webpack plugin back to what it was. Another solution would be to figure out how to fix the glob pattern that we pass into
from
. The lines here in the plugin notes how the full glob path is formed (by joining thecontext
with theform
glob pattern we pass in).One last thing to note is copy-webpack-plugin actually hasn't bumped their versions of
globby
orfast-glob
for almost a year....