astro/.changeset/quick-yaks-guess.md
2021-11-29 05:25:52 -06:00

1.1 KiB

astro
minor

👋 Say goodbye to full site rebuilds for small copy changes! Astro now supports incremental builds.

astro build now accepts a set of output paths that Astro should rebuild.

# static: rebuild `src/pages/index.astro`
astro build "/"

# dynamic: rebuild `/authors/nate` from `src/pages/authors/[author].astro`
astro build "/authors/nate"

# dynamic: rebuild all `/authors/...` paths from `src/pages/authors/[author].astro`
astro build "/authors/*"

# combined: rebuild `src/pages/index.astro` and `src/pages/authors/[author].astro`
astro build "/" "/authors/*"

You can also specify source files that have been updated! Astro can trace these inputs to determine exactly which pages need to be rebuilt. 🎉

# single page source, builds any paths generated by this file
astro build "src/pages/authors/[author].astro"

# shared component, builds any page that uses this component
astro build "src/components/Navigation.astro"

# multiple files
astro build "src/pages/index.astro" "src/components/Navigation.astro" "src/components/Counter.svelte"