News for hackers. Stuff that matters.
Re:Astro: Ship Less JavaScript by hnlmorg on Wednesday June 09, 2021 @03:56AM (#27445369)
That's not really fair. A lot of static sites simply don't need JS at all but they're built with it because it's deemed "best practice". My latest website, for example, has zero Javascript in it.

So much content is published in Github READMEs (typically markdown) and while Github itself will have Javascript elements, it does demonstrate that you don't need Javascript heavy sites to publish content.

I honestly think half the time the front end best practices are based around what's more intellectually interesting for developers rather than what is genuinely a better website.

Re:Astro: Ship Less JavaScript by csomar on Wednesday June 09, 2021 @05:38AM (#27446011)
You can use NextJS to build a fully static website with no JavaScript at the initial loading. There are tons of libraries (I think around 300Mb) to compile your site, but if you do optimizations right, the final website should be as lightweight as you expect it to be.

What you get? Routing, instant refresh, image optimization, and code optimization (your CSS could be smaller if you minify it).

Re:Astro: Ship Less JavaScript by FelipeCortez on Wednesday June 09, 2021 @01:04PM (#27450366)
Hmm, I think 300mb is a lot...