[chore] Reuse bundled lodash and lodash/fp dependency (#217467)

## Summary

After #217202 and #217034 this the another attempt with `lodash` and
`lodash/fp`.

In short:
`lodash` and `lodash/fp` have a special webpack treatment as they are
imported within the shared bundle.
Now webpack is not smart enough to understand that `import camelCase
from 'lodash/camelCase';` is still pointing to `lodash` and it thinks
that `lodash/camelCase` is a different package, de-optimizing the
bundling caching system.
So I’ve tweaked the import to make it point to the shared bundle and
save few kbs here and there
This commit is contained in:
Marco Liberati 2025-04-17 14:54:25 +02:00 committed by GitHub
parent ea3dead452
commit e21bec3f31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 57 additions and 68 deletions

View file

@ -8,7 +8,7 @@
*/
import { TSESTree } from '@typescript-eslint/typescript-estree';
import camelCase from 'lodash/camelCase';
import { camelCase } from 'lodash';
/*
Attempts to get a string representation of the intent