FormidableLabs / FormidableLabs/inspectpack

Undetected duplicates across bundles

Open
#150 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
590
Forks
20
PR merge metrics
No merged PRs in 30d

Description

According to the [multiple entry points](https://github.com/FormidableLabs/inspectpack/tree/917c7c9ba5118ae19b5992ed0afd505dbf6ba460#note-multiple-entry-points) section in the readme, inspectpack will analyse all of the bundled files across all of the entry points. However, as of v4.5.2, this doesn't work as expected for me.

I've set up a reduced test case in https://github.com/tlvince/tlvince-sandbox-webpack-duplicates - there are two entry points each pulling in a different version of lodash. Inspectpack does not seem to detect these:

```
❯ yarn inspectpack -s dist/stats.json -a versions
yarn run v1.22.10
$ /tmp/tlvince-sandbox-webpack-duplicates/node_modules/.bin/inspectpack -s dist/stats.json -a versions
inspectpack --action=versions
=============================

## Summary
* Packages with skews: 0
* Total resolved versions: 0
* Total installed packages: 0
* Total depended packages: 0
* Total bundled files: 0
Done in 0.20s.
```

Another tool, webpack-stats-duplicates, does:

```
❯ yarn webpack-stats-duplicates dist/stats.json
yarn run v1.22.10
$ /tmp/tlvince-sandbox-webpack-duplicates/node_modules/.bin/webpack-stats-duplicates dist/stats.json
Duplicate module lodash found in webpack configuration 0
./packages/a/node_modules/lodash
./packages/b/node_modules/lodash
```

In the bundle analyser report:

![Screenshot from 2020-12-02 09-48-05](https://user-images.githubusercontent.com/323761/100857259-67660a00-3484-11eb-84bb-7267c8d208ae.png)

Am I missing something or is this unsupported?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.