Builds and Adapters
In the previous four chapters, we’ve spent a significant amount of time discussing various routing techniques. From simple routing to pages that can be rendered as static HTML and speed up our application, to more complex tactics where we ensure the data is of an expected type through the use of regular expressions. While these techniques represent core features of SvelteKit, they are not all there is to it. Another useful quality found in SvelteKit is its ability to run in nearly any environment through the use of adapters. Before we dive into various adapters and their configurations, we’ll analyze the process involved when creating a production build of a SvelteKit application.
Firstly, we’ll need to address how to build our application for a production environment. Vite makes this step simple, so we’ll then pivot to how we can use different adapters to adjust builds for various environments. While each adapter has its own requirements...