Luckily, that’s not it’s target space.
If you engineer frontend applications of even moderate complexity, you will eventually start to pull in tooling + dependencies + configuration to handle real world use cases. Eventually? You end up with a once-off, home-grown variant of... what CRA emits anyway.
[1]: https://zeronet.io
Here is my rendition. Mind you, this is mainly for IE as ES6 has a String.padStart method. I would also use Array(n).fill() but again, IE does not support it, so manual string appending is the sacrifice to make..
module.exports = function(str, len, ch) {
if (ch === undefined || ch === '') ch = ' ';
str += "";
len -= str.length;
len /= ch.length;
var pre = "";
while (--len >= 0) pre += ch;
return pre + str;
}Remember that node_modules contains the entire world: it contains your compilers, transpilers, development server, development toolchain, and runtime libraries. All software is built on the shoulders of giants and Node's only mistake was making it plainly visible.
Finally, of course I don't consider myself the only person thinking about it but someone finally pointed the elephant in the room because it's been bugging me for a very long time, especially with anything related to NodeJS it feels like to actually get somewhere you need to pull hundreds if not thousands of tiny libraries dependencies. Once 1, 2, 50 of those tiny libraries becomes unmaintained and fall into a high risk vulnerability and there's no replacement that's it , you have to start taking care of it yourself. It could happen in any language, yes, but I feel it's more prone to happen in NodeJS given the nature of .... pulling hundreds of modules, even with Java/Maven you don't really pull that many libraries into your application unless it has some really wide scope in it.
I don't have any beef with NodeJS itself but the whole subject of having so much boilerplate code needed to get yourself started is a bit insane. I get that hardware has become more powerful and storage is cheap but... at which point is it no longer okay and becomes a burden to distribute said apps?