How is that any different from build tooling for any other language? On my system, gcc with a bunch of commonly used dependencies requires just about the same space (and it's a full Linux system, not a trimmed down container).
How is that any different from build tooling for any other language?
On the one hand yes, on the other hand it's a large amount of crap just to build a static site. `npm install @11ty/eleventy` pulls 600 packages and yields a 100MB node_modules folder.
Even Sphinx (whose scope goes way beyond static site generation) "only" pulls in about 75MB worth of stuff (a third of that being Babel) over two dozen dependencies (half a dozen being sphinx's own subcomponents).
There are real problems with NPM, like the proliferation of packages that include things they shouldn't (babel included a picture of Guy Feiri for a while...) but the simplistic "there's a lot of files" argument is nonsense. If you need a lot of files then you need a lot of files.
babel included a picture of Guy Feiri for a while...
I refuse to believe that there are real people so eager to jump on the JS hate bandwagon that they unironically believed every word of an obviously satirical article.
(babel has never included a picture of Guy Fieri.)
It was checked in as a humorous response to the very satirical article I'm talking about, and never actually published to the package registry.
But again, people are so ready to froth at the mouth wherever JS is even mildly concerned that I really shouldn't be surprised they'd take a meme that lasted for a handful of days seriously.
Obvious: Because GCC is a compiler not a runtime. Node is a runtime. You (usually) don't ship the compiler.
Less obvious: You probably wont need Nginx, especially for small static files, in languages where the native servers are fast enough (e.g. http.FileServer)
Comments
How is that any different from build tooling for any other language? On my system, gcc with a bunch of commonly used dependencies requires just about the same space (and it's a full Linux system, not a trimmed down container).
On the one hand yes, on the other hand it's a large amount of crap just to build a static site. `npm install @11ty/eleventy` pulls 600 packages and yields a 100MB node_modules folder.
Even Sphinx (whose scope goes way beyond static site generation) "only" pulls in about 75MB worth of stuff (a third of that being Babel) over two dozen dependencies (half a dozen being sphinx's own subcomponents).
To be fair, you still have a tree shaking and minification step that would reduce this quite a bit.
The problem with JS ecosystem is less about size and more about the number of files.
There are real problems with NPM, like the proliferation of packages that include things they shouldn't (babel included a picture of Guy Feiri for a while...) but the simplistic "there's a lot of files" argument is nonsense. If you need a lot of files then you need a lot of files.
I refuse to believe that there are real people so eager to jump on the JS hate bandwagon that they unironically believed every word of an obviously satirical article.
(babel has never included a picture of Guy Fieri.)
It might not have been a picture, but there was an ASCI art of his face that got checked in.
https://github.com/babel/babel/blob/f36d07d30334f86412a9d277...
It was checked in as a humorous response to the very satirical article I'm talking about, and never actually published to the package registry.
But again, people are so ready to froth at the mouth wherever JS is even mildly concerned that I really shouldn't be surprised they'd take a meme that lasted for a handful of days seriously.
Obvious: Because GCC is a compiler not a runtime. Node is a runtime. You (usually) don't ship the compiler.
Less obvious: You probably wont need Nginx, especially for small static files, in languages where the native servers are fast enough (e.g. http.FileServer)
For a static site Node is a compiler not a runtime dependency.
Node is a compiler too..
A closer comparison - an average node folder weighs a lot more than an average Python virtualenv.
Um... deploy the binary, don't build it in the image.