I used to be able to use a lodash method in Angular by an import statement that looked like the following:
import {debounce as _debounce} from \'lodash\';
I've tried different approaches to reduce lodash size in bundle and while the updated answer by Kuncevič works my bundle still includes non-es lodash (my guess it's because it's required by some other dependency) so at this point I dont think it makes sense adding lodash-es at all or importing functions separately from 'lodash'. From what I understand npm does deduplication and moves lodash to top-level folder (node_modules) that's why it's there even after I removed it from package.json and reinstalled node_modules. Webpack doesn't care about package.json and if it sees that lodash is imported by anyone - bundles it.