Open alexander-schranz opened 3 years ago
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
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.
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: https://github.com/lodash/lodash/issues/5107.
This is more a question, I did see that this package install in my application
lodash
andlodash-es
. Is here both required?