Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formik add duplicate dependency react-fast-compare which increase bundle size #3646

Open
kopax-polyconseil opened this issue Sep 15, 2022 · 0 comments

Comments

@kopax-polyconseil
Copy link

kopax-polyconseil commented Sep 15, 2022

Bug report

Current Behavior

Duplicate Sources / Packages - Duplicates found! ⚠️
* Duplicates: Found 2 similar files across 2 code sources (both identical + similar)
  accounting for 7288 bundled bytes.
* Packages: Found 1 packages with 2 resolved, 2 installed, and 2 depended versions.

## static/js/2.fa076d51.chunk.js
react-fast-compare (Found 2 resolved, 2 installed, 2 depended. Latest 3.2.0.)
  2.0.4
    ~/react-fast-compare
      * Dependency graph
        [email protected] -> formik@^2.2.9 -> react-fast-compare@^2.0.1
      * Duplicated files in static/js/2.fa076d51.chunk.js
        react-fast-compare/index.js (S, 2829)

  3.2.0
    ~/react-helmet/~/react-fast-compare
      * Dependency graph
        [email protected] -> react-helmet@^6.1.0 -> react-fast-compare@^3.1.1
      * Duplicated files in static/js/2.fa076d51.chunk.js
        react-fast-compare/index.js (S, 4459)

Expected behavior

Formik should not add duplicate module in our bundled Web app

Reproducible example

git clone https://github.com/pass-culture/pass-culture-app-native.git
cd pass-culture-app-native
yarn --force
nvm install 18 # if necessary
nvm use
export NODE_OPTIONS=--openssl-legacy-provider
yarn build:testing

Suggested solution(s)

Upgrade react-fast-compare to next major version

Additional context

image

Your environment

Software Version(s)
Formik 2.2.9
React 17.0.2
TypeScript 4.3.5
Browser Chrome latest
npm/Yarn 1.22.15
Operating System Linux dka 5.8.0-0.bpo.2-amd64 #1 SMP Debian 5.8.10-1~bpo10+1 (2020-09-26) x86_64 GNU/Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant