SvelteKit Module Summaries
In previous chapters, we’ve used several different modules but only provided short explanations. While the analysis in this section will also be brief, it should provide a broad enough insight that prospective SvelteKit developers feel familiar with the workings of available modules. We have encountered a few listed here but there are some that we are yet to cover. For more in-depth explanations, see the resources at the end of this chapter.
$app/environment
To begin our analysis of modules, let’s start with one that we have used relatively recently. In Chapter 9, while attempting to throw an error in the client, we used the $app/environment
module and imported browser
. As we’ve come to expect with SvelteKit naming conventions, all of the bindings exported from this module pertain to the application environment. This makes it trivial to identify the purpose of each of the bindings by their names. For instance, we saw that browser...