cylc / cylc-ui

Web app for monitoring and controlling Cylc workflows
https://cylc.github.io
GNU General Public License v3.0
35 stars 26 forks source link

Switch to `lodash-es` for treeshaking #1773

Closed MetRonnie closed 2 months ago

MetRonnie commented 2 months ago

TIL the lodash package is CommonJS and isn't tree-shaken!

This PR replaces lodash with lodash-es which is an ES modules version of the package which allows tree-shaking.

I've confirmed this by comparing the non-minified built files before and after. There are a bunch of lodash functions included with the build on master that are not on this branch. The total reduction in the minified build is something like ~70kB

Check List