Support webpack's config.resolve.modules paths

Open
#75 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start by reproducing the reported dependency-tree case with the special-library.lib.js import and a webpack-style resolve.modules value containing _libs/. Trace the dependency resolution entry point, then verify that imports found through the extra module path are resolved rather than placed in nonExistent.

Written by the indexing model from the issue text.

Description

In our source code, we have imports that do not have paths, and that are not node-modules. For example:

import 'special-library.lib.js'

Currently, when I try to get the dependency tree, this file shows up in the nonExistent array and is not resolved.


These libfiles are common library style files we use in our app that we don't want in node_modules. This is made possible by webpack's config.resolve.modules option:

resolve: {
    modules: {
        'node_modules',
        '_libs/' //this tells webpack to search in _libs for imports
    }
}

How can I get dependency-tree to understand my extra webpack modules?

Dominant language
JavaScript
Stars
776
Forks
82
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dependents/node-dependency-tree

All issues in dependents/node-dependency-tree

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.