Exploring the Build Process and Customization

Learn how we can build projects in Astro and how to hook into different phases of the build process.

Astro comes with its own build command that automatically optimizes Astro components for a production-ready environment. In this lesson, we’ll take a look at how to build an Astro project to create production-ready bundles and how to change build-related configurations.

Building the project

To build an Astro project, we can use the astro build command. This command is automatically created for new Astro projects, so we can execute it by running npm run build. Try building the project below by running npm run build inside the terminal.

Get hands-on with 1200+ tech skills courses.