-
Notifications
You must be signed in to change notification settings - Fork 84
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
Support webpack's config.resolve.modules paths #75
Comments
Hey @kevinokerlund! Thanks for contributing! This is already handled here https://github.com/dependents/node-filing-cabinet/blob/f11d3229e718b57a8b2c8f0eb5e6c952c596cda7/index.js#L256-L268 if you provide a webpack config to dependency tree. Can you let me know what your dependency-tree config looks like? Are you using this lib via https://github.com/pahen/madge? It's either a configuration error or an intricate bug that needs to be fixed in the linked code above. |
@mrjoelkemp, thanks for getting back to me. I went ahead and set up a I dove a bit into I found that it does work when I update modules: [
'node_modules',
'src/internal-libs' // prepended src/
] but I feel that it's pretty common to have the For debugging purposes, I logged out
|
@kevinokerlund Thanks for the additional details. I haven't forgotten about this. Webpack resolution via enhanced-resolve was intentionally lagging behind due to their move to es6 and deprecation of older node versions without a major version bump. I figured it would be good to finally try getting up to their most recent version. I did that within filing-cabinet but have some test issues to work out with mock-fs in upstream libraries before calling that work complete. In the mean time, if you do a fresh install of the dependencies, you should get filing-cabinet v1.13.0. I'm curious if that works as you'd expect. Thanks and sorry for the delay in replying. I'm glad there's a workaround in the mean time. |
In our source code, we have imports that do not have paths, and that are not
node-modules
. For example:Currently, when I try to get the dependency tree, this file shows up in the
nonExistent
array and is not resolved.These
lib
files are common library style files we use in our app that we don't want innode_modules
. This is made possible by webpack'sconfig.resolve.modules
option:How can I get
dependency-tree
to understand my extra webpack modules?The text was updated successfully, but these errors were encountered: