Hacker News new | ask | show | jobs
by Makhini 1085 days ago
As a Java developer, why the hell does Javascript still doesn't have a equivalent of Gradle or Maven? An extensible build tool that does it all and uses sensible defaults?
1 comments

One issue with JS is completely different environments. There's very little in common between node.js and browser environment. For node.js you technically don't need a build system at all. For browser: it depends. Until recently you had to bundle your frontend into a single or few large files. Right now you technically can develop a frontend without a build system either, at least when it comes to your code, without dependencies.

Second reason is quickly moving APIs. Common.js, AMD, ESM. Those are foundational APIs and they were changing every few years. Just similar Java example: java modules were introduced in Java 9 and even today maven (AFAIK) does not utilize those at all. But java modules were infinitely more compatible with old code.

Third reason is TypeScript. It does require a "stripping types" step which could be counted as a compilation.

Fourth reason is community. I don't really know what's so special about JS community, but they deliver new tools and frameworks at alarming speed. There's no single source of truth. You can't really do anything with this chaos. Google develops angular, but it's not popular. Facebook develops React and it is popular but people still use other frameworks like vue from small companies.

10 years ago I thought that with time things will settle down. Now I'm not so sure.