Using SvelteKit features
svelte-zukan does not replace or mock SvelteKit’s runtime APIs such as $app/state and $app/navigation. Inside the catalog, SvelteKit’s runtime code runs in its default state:
pagefrom$app/state:url.pathnameis an empty string,paramsis{}, anddatais{}browserfrom$app/env:truegotoand the other functions from$app/navigation: they reject, and the page does not navigateresolvefrom$app/paths: returns a URL based on the app’spaths.base(with an emptypaths.base,resolve('/')is/). It is not the catalog’s own URLassetfrom$app/paths: likeresolve, returns a URL based on the app’spaths.base(for example,asset('favicon.svg')is/favicon.svg).paths.assetsis not used inside the catalog. When the catalog reads a file from the app’sstatic/, the one served by the app’s dev server is usedassets,immutable,prerenderedandroutesfrom$app/manifest: what SvelteKit’s dev server gives in dev, and empty arrays in the static export- Dynamic public environment variables from
$app/env/public(or$env/dynamic/public):undefined, in dev and in the static export: only a page SvelteKit renders receives them, and the catalog is not one. Static variables keep their values
Components that change their display based on the current page, such as navigation, render with these default values in the catalog. Except where noted above, the static export behaves the same way.