I can't tell from the homepage or the blog post what this does and why it would make my life as a developer easier.
> I can't tell from the homepage or the blog post what this does The passage below, on the linked page, is a dead giveaway of what it does, no? > - 100% Static HTML, No JS: Astro renders your entire page to static HTML, removing all JavaScript from your final build by default. > - On-Demand Components: Need some JS? Astro can automatically hydrate interactive components when they become visible on the page. If the us…
Astro: Ship Less JavaScript
61–70 of 171 posts
Re: Astro: Ship Less JavaScript
#62But I do need some JavaScript. What I want is just an easy way to drop excess packages from the webpack bundle ("tree shaking"). Seems a little manual with the default webpack process for that.
Re: Astro: Ship Less JavaScript
#63While I haven’t contributed yet (besides a slew of comments on issues/PRs), I’m stoked to take another stab at a Solid renderer plugin.
Really impressive work y’all. Can’t wait to see how it grows.
Re: Astro: Ship Less JavaScript
#64Earlier quoted context omitted.
Yes, with SvelteKit you can use the static adapter to generate static html files for your routes. It's also possible to control this on a page by page basis.
Thanks. What if only some components in my page require Javascript? Can the same "partial hydration" be achieved?
Re: Astro: Ship Less JavaScript
#65Re: Astro: Ship Less JavaScript
#66Is Astro very different from using another SSG like Hugo, then adding JavaScript in places you need it like type ahead search box or an interactive map? Given that it’s possible to add JavaScript to an SSG made site already, I don’t get what Astro does that’s different.
A great use case is if you like to work with an isomorphic component library, but you’re building a mostly-static site (in the sense that it’s mostly non-interactive). Tools like Next etc provide that DX, but they bundle/run that static content twice per page load. Astro only bundles the stuff you specifically mark as interactive.
This probably sounds trivial if you’re taking a more traditional approach to server/client responsibilities. But for anyone wanting to render on build and hydrate with the same component logic it’s a huge improvement over most of the current isomorphic approaches.
Re: Astro: Ship Less JavaScript
#67Earlier quoted context omitted.
Congrats on the release. For some reason when I heard of Astro, I thought it was a dynamic server-side rendering framework, not a static site builder. But I'm sure someone else will take on SSR with islands if they haven't already. Also: > Astro is and always will be free. It is an open source project released under the MIT license. > We care deeply about building a more sustainable future for open source software. A…
Elder.js supports Islands with SSR. It is also MIT. I released it as an SEO experiment as much as anything else. I’m enjoying the dev process and am committed to facilitating (myself or paying another) it’s maintenance for several years. I can do that because my prior successes can subsidize the cost. If I had to do it again, I’d probably pick another license. As a first time maintainer of a project that is hitting t…
I'm perplexed by this. You wrote that Elder.js was an experiment. I sense that the stress you are feeling now is a result of trying to make it work for everybody else. But it doesn't have to work for anybody else.
OSS that is a slave to people who don't contribute may very well be unsustainable. OSS for the fun and use of it is perfectly sustainable. If Elder.js does what you need, that's great! If you're hoping it makes you the next DR Hipp or John Resig, maybe think about whether you really want that. If you do want that, that's fine, too. It just comes with a lot of demands.
Re: Astro: Ship Less JavaScript
#68I don't want a build process. I don't want to have to use npm, but want the option if I desire, for something like React. And when I use React, because there is unfortunately no better option, I use `"build": "npx babel --watch public/javascripts/src --out-dir public/javascripts/. --presets react-app/prod"` and that's it. I don't want create-react-app lock-in. Eject doesn't count. That's an illusion. My favorite proc…
I love having a build because it automates a lot of useful, difficult work. Tree-shaking is a good example.
If you want to do a lot more work because of some hipster devotion to "craft" or whatever (I honestly can't understand your argument beyond its condescending tone), you do you.
This is a tool for people who like to make their lives easier by automating things, and you're not going to categorically change anyone's mind by tilting at windmills.
Re: Astro: Ship Less JavaScript
#69Sometimes I wonder what was wrong with a mostly static pages in the first place. Even http://mail.google.com/mail/h/ works fine, even in a slower browser - and I would say 80% of the sites today are less complex than Gmail.
Re: Astro: Ship Less JavaScript
#70Earlier quoted context omitted.
Congrats on the release. For some reason when I heard of Astro, I thought it was a dynamic server-side rendering framework, not a static site builder. But I'm sure someone else will take on SSR with islands if they haven't already. Also: > Astro is and always will be free. It is an open source project released under the MIT license. > We care deeply about building a more sustainable future for open source software. A…
> By now we should be ready to accept that free software with no strings attached just isn't sustainable except for projects with big corporate backers. That very much depends on who the authors of the software are and what their goals/motivations are. This is far too much of a blanket statement. I agree that no one should be ashamed to sell software that they write. Also, those authors can and should be the ones to…
If you want to use it for your hobby, go ahead.
When the extension office down the road wanted to use it for their cactus farm, that was fine by me. I added some stuff specific to cactii that they wanted. They added some more stuff. No big deal. It works for them, I guess.
When the U.S. Forest Service expressed interest, I was surprised, but, hey, whatever. They added some features, but needed some small architectural changes for those changes to fit in. They were reasonable and easy, so it was ok. I have no idea where they use it or what they use it for, really. But if it works for them, great.
This latest contact out of Brazil, though, is different. They want me to fly down there for two months and completely re-work the app to monitor the entire Amazon forest. Thousands of species and tens of thousands of monitoring stations in a giant mesh network across much of a continent.
Should I ask them for a donation?
OSS can be a hobby. It can be a passion consuming a lot of time and energy. And it can be a job. If it is a job, you get paid.