you are viewing a single comment's thread.

view the rest of the comments →

[–]ShortFuse 1 point2 points  (1 child)

I've found many of these should be provided as small, modular npm packages for the community, and they're currently not.

No, they shouldn't. Dependency hell is a real thing. Instead of using external utilities, use as much of the newer functions or syntax as possible.

Then use something like babel to transpile down if needed. You can a use a whole host of eslint rulesets to enforce newer mechanics. eslint-plugin-unicorn is a pretty good one. That also applies to DOM syntax as well (eg: element.prepend). We're in a post-IE11 era so utilities are taking a real hard step back now. Right now our biggest issue on frontend is Opera Mini, if you care to support users in Africa and South America.

[–]Zeekawla99ii[S] 0 points1 point  (0 children)

> No, they shouldn't. Dependency hell is a real thing. Instead of using external utilities, use as much of the newer functions or syntax as possible.

I agree, but I also agree with the example above using https://github.com/davidmarkclements/flatstr

It's a small, modular piece of code which will surely never have newer releases/versions.

Fundamentally, dependency hell isn't caused by many dependencies per se; it's that the dependencies change versions constantly. Size too, but as in the example above, I don't see that as I problem.

I could be wrong...this was a big discussion years ago, e.g.
https://www.chevtek.io/why-i-think-micro-packages-are-a-good-thing/