Earlier quoted context omitted.
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…
Shrinking my static site
11–20 of 107 posts
Re: Shrinking my static site
#12Re: Shrinking my static site
#13Why even have a docker image for a static site? If the site has to be built like this one then just put the output of the build process behind some webserver. We were doing this back in the 90s and didn't have to write blog posts about how not to make your site 400MB.
That's what this is doing.
You are skipping over two other parts which are installing and setting up nginx / similar and creating a process for the build itself. This ties the three together.
Re: Shrinking my static site
#14Re: Shrinking my static site
#15Re: Shrinking my static site
#16Earlier quoted context omitted.
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).
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)
Re: Shrinking my static site
#17https://hub.docker.com/_/caddy/
You also get automatic TLS certificate management and tons of other goodies that nginx doesn't offer out of the box.
Re: Shrinking my static site
#18Earlier quoted context omitted.
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).
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)