rollup-plugin-optimize-lodash-imports
rollup-plugin-optimize-lodash-imports copied to clipboard
Optimize lodash imports
There are multiple issues surrounding tree-shaking of lodash. Minifiers, even with dead-code elimination, cannot currently solve this problem.
Plugins can reduce final bundle sizes with minimal or no manual code changes. See the example showing a 70% reduced bundle size for an example input.
Packages:
@optimize-lodash/rollup-plugin
A fast, lightweight plugin for Rollup bundling.
@optimize-lodash/esbuild-plugin
A expertimental plugin for esbuild bundling. (Experimental = esbuild is rapidly changing and unlike the Rollup plugin, this has not been used in a production code base.)
@optimize-lodash/transform
Code transforms for lodash imports. Used by bundler plugins for a consistent, well-tested, shared set of transforms.