FormidableLabs / inspectpack

An inspection tool for Webpack frontend JavaScript bundles.
MIT License
592 stars 20 forks source link

Feature: Add an option for allowed duplicates #132

Closed tido64 closed 4 years ago

tido64 commented 4 years ago

Some packages are not resolvable such as fbjs below:

fbjs (Found 2 resolved, 2 installed, 2 depended. Latest 1.0.0.)
  0.8.17
    ~/create-react-class/~/fbjs
      * Dependency graph
        MyApp@0.0.1 -> react-native@0.61.2 -> create-react-class@^15.6.3 -> fbjs@^0.8.9
      * Duplicated files in index.ios.bundle.js
        fbjs/lib/invariant.js (S, 1506)

  1.0.0
    ~/fbjs
      * Dependency graph
        MyApp@0.0.1 -> react-native@0.61.2 -> fbjs@^1.0.0
      * Duplicated files in index.ios.bundle.js
        fbjs/lib/emptyFunction.js (S, 961)
        fbjs/lib/invariant.js (S, 1550)
        fbjs/lib/warning.js (S, 1671)

It would be nice if we could still enable emitErrors and provide a list of packages that it can safely ignore.

tido64 commented 4 years ago

@ryan-roemer Is this something that you have planned? Do you think it makes sense to have it? I wouldn't mind helping out if I can get some pointers on where to start.

tido64 commented 4 years ago

I think figured it out. Let me know what you think :)

ryan-roemer commented 4 years ago

Fixed in https://github.com/FormidableLabs/inspectpack/pull/134