dependents / dependents/node-precinct

Webpack's `require.context` not being employed

Open
#35 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
234
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Related/original report: https://github.com/pahen/madge/issues/117

It appears Precinct does not work with webpack's dynamic loading with [require.context](https://webpack.github.io/docs/context.html) (basically glob) so e.g.

```javascript
var context = require.context(".", true, /\.js$/)
context.keys().forEach(context)
```

This ought to load all the modules with /\.js$/ from the current directory (".") and subdirectories (that's what the `true` specifies).

It does not appear to do so, at least via Madge/node-dependency-tree, and I did not see any mention of it in the Precinct code.

Just a heads up.

🍻

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.