Summary
In this chapter, we discussed some of the prerequisite knowledge and tools needed for getting started with SvelteKit. You likely already had a computer running a capable operating system with a browser installed. You may even have had the latest LTS version of Node.js installed with the npm
package manager. We also briefly touched on getting your editor prepared by installing Svelte-specific extensions.
We continued by covering the installation process of SvelteKit. The prompts provided during the installation make setting up a new SvelteKit project simple and easily customized to a developer’s liking.
After the project installation, we took a high-level look at SvelteKit’s project structure. While the tests/
and static/
directories are fairly straightforward, some nuances lie within the src/
folder. For instance, keeping various Svelte components and other utilities in the src/lib/
folder can help keep a project from becoming difficult to navigate. Components located there are also easily accessed across application code via the $
lib/
alias.
We also created a rudimentary “Hello, World!” application. It showcased how simple SvelteKit makes it to start building an application from scratch.
In the next chapter, we’ll go over some of the various configuration options you may need to tweak in both SvelteKit and Vite to customize them to suit your needs.