Incremental build support #237
Replies: 7 comments
-
It seems like this would be very simple, to add to the cli and accept an arg. We hope this is prioritized so larger sites can migrate to Astro! |
Beta Was this translation helpful? Give feedback.
-
I have a couple of sites with 1,000+ pages and I'm keen on something in this area to improve the developer-time experience. I use build + preview as I find it more reliable than the dev option. When I only change a markdown file (not a component that's used everywhere) a single build of that file would be amazing. |
Beta Was this translation helpful? Give feedback.
-
I agree. This is crucial for big projects with hundreds and thousands of pages. |
Beta Was this translation helpful? Give feedback.
-
I made a POC for incremental builds using deno (instead of node) for its storage backend. Here are the results when applied to astro -> typescript compiler. Admittedly, the astro compiler is already pretty fast but the same approach could be applied to other compilations. To manage expectations, the work done by astro's built-in vite plugins (the part that runs when you see |
Beta Was this translation helpful? Give feedback.
-
ISR would be amazing 🥹 |
Beta Was this translation helpful? Give feedback.
-
@lilnasy As this is one of the most popular and most requested feature on the discussion roadmap alongside ISR #237, incremental builds is a must have for content heavy sites that astro is built for. I have around 200,000 generated pages with Astro and I have to wait 10 minutes for EACH build which isn't ideal. At scale for around 400,000 I'll be waiting around 20 minutes and so on. Assuming a user building their site with astro has already done their initial or first build, surely astro must cache this somewhere and diff / analyse changed files based on their content or hash then choose to only build content that has changed. Even an analyse or diff ISR API would be helpful for developers that would like to customise their workflow of only updating changed files, perhaps only returning page paths ['/test1', '/test5'] that have changed and are ready to be rebuilt again. |
Beta Was this translation helpful? Give feedback.
-
Great news! This proposal has been accepted and is moving on to Stage 2 of our process! 🎉 See Incremental Builds. What does that mean?The Astro maintainers and technical steering committee have agreed to explore official Astro support for this feature. @natemoo-re has agreed to champion this proposal. What happens now?
Where can we follow along?This discussion will be closed. Please follow along on the accepted proposal. Don't hesitate to share additional feedback, use cases, or concerns on the accepted proposal. |
Beta Was this translation helpful? Give feedback.
-
AFAIK currently Astro need full rebuild for minor change, any plan to support incremental build where only rebuilding done for updated pages. Currently, Gatsby support incremental builds. This saves a lot of time for websites with large number of static pages.
Beta Was this translation helpful? Give feedback.
All reactions