Skip to content

kyle-johnson/rollup-plugin-optimize-lodash-imports

Repository files navigation

Optimize lodash imports

GitHub Workflow Status Codecov

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:

npm node-current npm peer dependency version

A fast, lightweight plugin for Rollup bundling.

npm node-current npm peer dependency version

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.)

npm

Code transforms for lodash imports. Used by bundler plugins for a consistent, well-tested, shared set of transforms.