Skip to content

Undetected duplicates across bundles #150

Description

@tlvince

According to the 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

Am I missing something or is this unsupported?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions