DEV Community

Alex Lohr
Alex Lohr

Posted on

A new paradigm

humourous comparison of sun, neutron star and black to the contents of node_modules

I witnessed the rise of a new paradigm in the world of JS development that surprised me: frugality.

We've all seen enough of the opposite. Pulling a new dependency in our project more often than not takes some time, because it's megabytes of code and uses some more dependencies itself and before you realize it, node_modules fills your disk space faster than unrotated log files.

It's ok, you'll say, it's just tooling, not the code that appears in the user's browser. But wouldn't it be great if everything was just a bit leaner, faster and more self-reliant?

This question is apparently asked by an increasing number of people. A few of them are the authors of the upcoming testing framework vitest. While during development they used parts of jest and more heavyweight dependencies, most of them were either replaced by internal code or more lightweight, reusable modules.

Then, there's goober, a minimalistic framework-agnostic css-in-js component library. You'll probably find more examples of modern yet frugal tools and libraries.

Less code will statistically also contain less bugs and it is good for performance, too. The less code there's to parse, the faster the startup. I invite you to consider this new paradigm for your own packages, too.

Top comments (0)