Think twice before using lodash

Lodash is a great lib, but think twice before using it if you are developing micro app. Here is an example:

Before lodash

$ vite build
[write] dist/index.html 1.16kb, brotli: 0.42kb
[write] dist/_assets/index.94d3cce4.js 57.03kb, brotli: 19.53kb
[write] dist/_assets/style.d947e90b.css 0.38kb, brotli: 0.19kb
Build completed in 5.41s.

After lodash

$ vite build
[write] dist/index.html 1.16kb, brotli: 0.42kb
[write] dist/_assets/index.d2816352.js 126.13kb, brotli: 40.77kb
[write] dist/_assets/style.d947e90b.css 0.38kb, brotli: 0.19kb
Build completed in 10.02s.


Posted

in

by

Tags:

Comments

Leave a Reply