-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ignore path problem #106
Conversation
does this work with npm and yarn and pnpm ? |
we don't need the USING_NPM flag anymore, so I removed the use of them in webpack.config.js. After adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you update the package.json version? bump the patch version
theres also an readme-imodeljs.md that needs to be updated
done |
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....