concept preload in category svelte
appears as: preload

This is an excerpt from Manning's book Svelte and Sapper in Action.
When the server for a Sapper app is started, the code in the
<scriptcontext="module">element of all routes and all components they import is run. This provides a way to perform any necessary setup tasks, such as establishing WebSocket connections. Often a module context only defines apreloadfunction and does not contain any code to be executed immediately.