Speeding up the JavaScript ecosystem – Polyfills gone rogue

Many popular npm packages have unnecessary dependencies, particularly in the eslint ecosystem. These extra dependencies are often polyfills for JavaScript functions that have long been supported. For example, packages like eslint-plugin-react unnecessarily pull in a polyfill for Object.defineProperties, which is already built into JavaScript engines. What’s even more surprising is that these polyfill functions are imported and called directly, rather than patching missing functionality. This results in larger node_modules folders and makes it more difficult to audit project dependencies. Removing unnecessary eslint plugins and presets can significantly decrease the number of dependencies, highlighting the need for more efficient dependency management. In the words of Joe Armstrong, “You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.”

https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-6/

To top