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

Why lodash and lodash-es #822

Open
alexander-schranz opened this issue May 18, 2021 · 4 comments
Open

Why lodash and lodash-es #822

alexander-schranz opened this issue May 18, 2021 · 4 comments

Comments

@alexander-schranz
Copy link

This is more a question, I did see that this package install in my application lodash and lodash-es. Is here both required?

@jjb
Copy link

jjb commented Jul 20, 2021

#749

@alexander-schranz
Copy link
Author

alexander-schranz commented Jul 21, 2021

Would it be possible to define lodash and lodash-es as peerDependency so only one of them is installed in my project, which I define? See #829

@bmakan
Copy link

bmakan commented Jun 7, 2023

How do we get rid of non-es lodash? Right now, they are both installed when I install react-color and they both end up in my bundle.

react-color is the only package using the non-es lodash I have right now.

@bmakan
Copy link

bmakan commented Jun 8, 2023

I managed to get rid of lodash by adding an alias to my vite.config.ts:

...
resolve: {
    alias: {
        lodash: 'lodash-es',
    },
},
...

Fairly sure something similar can be done for webpack and other bundlers.

This is a wider issue supposedly being addressed by the lodash maintainers: lodash/lodash#5107.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants