Open bz2 opened 3 years ago
Thank you so much for this!! 🙂
FYI, I think the tests will break when using Yarn PnP, since then there won't be a node_modules folder.
This fixes the problems described in #45 and #43 for me. If anyone else cares, this PR can also be used as a workaround by adding the filter
definition from it into your LicenseCheckerWebpackPlugin
options, like this:
new LicenseCheckerWebpackPlugin({
allow: "(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR 0BSD)",
filter: /(^.*[/\\]node_modules[/\\]((?:@[^/\\]+[/\\])?(?:[^@/\\][^/\\]*)))/,
...
Would still be better if this could be merged and released :)
anychance microsoft will actually review this?
Part of the issue may the that the maintainer now works at twitter not ms. Maybe @unindented could suggest a former colleague I could bug about taking over package?
Part of the issue may the that the maintainer now works at twitter not ms. Maybe @unindented could suggest a former colleague I could bug about taking over package?
Have same issue with vuejs
:
ERROR HookWebpackError: Cannot find module 'node_modules\@vue/package.json'
Require stack:
- node_modules\license-checker-webpack-plugin\src\licenseUtils.js
- node_modules\license-checker-webpack-plugin\src\index.js
- vue.config.js
- package.json
Fixes microsoft/license-checker-webpack-plugin#25
A valid node module name is either
\w+
or@\w+/\w+
never@\w+
.This is enough of a hairy internal implementation detail that filter should probably not be exposed even as an (undocumented) option. But leaving alone for now as changing the pattern has been a useful workaround.
There are some other implications from the webpack 5 changes to
fileDependencies
and the current code behaviours but those will need a bit more discussion to address I think.