@sveltejs/kit 2.6.3 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/constants.js +0 -12
- package/src/core/postbuild/prerender.js +7 -1
- package/src/exports/public.d.ts +6 -6
- package/src/exports/vite/dev/index.js +17 -21
- package/src/exports/vite/index.js +6 -60
- package/src/runtime/client/client.js +4 -1
- package/src/runtime/server/utils.js +0 -14
- package/src/types/synthetic/$lib.md +1 -1
- package/src/version.js +1 -1
- package/types/index.d.ts +6 -6
- package/types/index.d.ts.map +1 -1
package/package.json
CHANGED
package/src/constants.js
CHANGED
|
@@ -9,15 +9,3 @@ export const GENERATED_COMMENT = '// this file is generated — do not edit it\n
|
|
|
9
9
|
export const ENDPOINT_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD'];
|
|
10
10
|
|
|
11
11
|
export const PAGE_METHODS = ['GET', 'POST', 'HEAD'];
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Placeholders for the hash of the app version.
|
|
15
|
-
* Later replaced in the generateBundle hook to avoid affecting the chunk hash.
|
|
16
|
-
*/
|
|
17
|
-
export const APP_VERSION_HASH_PLACEHOLDER_BASE = '__SVELTEKIT_APP_VERSION_HASH__';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Placeholder for the app version.
|
|
21
|
-
* Later replaced in the generateBundle hook to avoid affecting the chunk hash.
|
|
22
|
-
*/
|
|
23
|
-
export const APP_VERSION_PLACEHOLDER_BASE = '__SVELTEKIT_APP_VERSION__';
|
|
@@ -16,6 +16,12 @@ import { createReadableStream } from '@sveltejs/kit/node';
|
|
|
16
16
|
|
|
17
17
|
export default forked(import.meta.url, prerender);
|
|
18
18
|
|
|
19
|
+
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment
|
|
20
|
+
// "If fragment is the empty string, then return the special value top of the document."
|
|
21
|
+
// ...and
|
|
22
|
+
// "If decodedFragment is an ASCII case-insensitive match for the string 'top', then return the top of the document."
|
|
23
|
+
const SPECIAL_HASHLINKS = new Set(['', 'top']);
|
|
24
|
+
|
|
19
25
|
/**
|
|
20
26
|
* @param {{
|
|
21
27
|
* out: string;
|
|
@@ -485,7 +491,7 @@ async function prerender({ out, manifest_path, metadata, verbose, env }) {
|
|
|
485
491
|
// ignore fragment links to pages that were not prerendered
|
|
486
492
|
if (!hashlinks) continue;
|
|
487
493
|
|
|
488
|
-
if (!hashlinks.includes(id)) {
|
|
494
|
+
if (!hashlinks.includes(id) && !SPECIAL_HASHLINKS.has(id)) {
|
|
489
495
|
handle_missing_id({ id, path, referrers: Array.from(referrers) });
|
|
490
496
|
}
|
|
491
497
|
}
|
package/src/exports/public.d.ts
CHANGED
|
@@ -396,12 +396,12 @@ export interface KitConfig {
|
|
|
396
396
|
*/
|
|
397
397
|
dir?: string;
|
|
398
398
|
/**
|
|
399
|
-
* A prefix that signals that an environment variable is safe to expose to client-side code. See [`$env/static/public`](/docs/modules#$env-static-public) and [`$env/dynamic/public`](/docs/modules#$env-dynamic-public). Note that Vite's [`envPrefix`](https://vitejs.dev/config/shared-options.html#envprefix) must be set separately if you are using Vite's environment variable handling - though use of that feature should generally be unnecessary.
|
|
399
|
+
* A prefix that signals that an environment variable is safe to expose to client-side code. See [`$env/static/public`](https://kit.svelte.dev/docs/modules#$env-static-public) and [`$env/dynamic/public`](https://kit.svelte.dev/docs/modules#$env-dynamic-public). Note that Vite's [`envPrefix`](https://vitejs.dev/config/shared-options.html#envprefix) must be set separately if you are using Vite's environment variable handling - though use of that feature should generally be unnecessary.
|
|
400
400
|
* @default "PUBLIC_"
|
|
401
401
|
*/
|
|
402
402
|
publicPrefix?: string;
|
|
403
403
|
/**
|
|
404
|
-
* A prefix that signals that an environment variable is unsafe to expose to client-side code. Environment variables matching neither the public nor the private prefix will be discarded completely. See [`$env/static/private`](/docs/modules#$env-static-private) and [`$env/dynamic/private`](/docs/modules#$env-dynamic-private).
|
|
404
|
+
* A prefix that signals that an environment variable is unsafe to expose to client-side code. Environment variables matching neither the public nor the private prefix will be discarded completely. See [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private) and [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private).
|
|
405
405
|
* @default ""
|
|
406
406
|
* @since 1.21.0
|
|
407
407
|
*/
|
|
@@ -504,7 +504,7 @@ export interface KitConfig {
|
|
|
504
504
|
*/
|
|
505
505
|
assets?: '' | `http://${string}` | `https://${string}`;
|
|
506
506
|
/**
|
|
507
|
-
* A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](/docs/modules#$app-paths-base) for that: `<a href="{base}/your-page">Link</a>`. If you find yourself writing this often, it may make sense to extract this into a reusable component.
|
|
507
|
+
* A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](https://kit.svelte.dev/docs/modules#$app-paths-base) for that: `<a href="{base}/your-page">Link</a>`. If you find yourself writing this often, it may make sense to extract this into a reusable component.
|
|
508
508
|
* @default ""
|
|
509
509
|
*/
|
|
510
510
|
base?: '' | `/${string}`;
|
|
@@ -646,7 +646,7 @@ export interface KitConfig {
|
|
|
646
646
|
* </script>
|
|
647
647
|
* ```
|
|
648
648
|
*
|
|
649
|
-
* If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of the [`updated`](/docs/modules#$app-stores-updated) store to `true` when it detects one.
|
|
649
|
+
* If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of the [`updated`](https://kit.svelte.dev/docs/modules#$app-stores-updated) store to `true` when it detects one.
|
|
650
650
|
*/
|
|
651
651
|
version?: {
|
|
652
652
|
/**
|
|
@@ -799,7 +799,7 @@ export interface LoadEvent<
|
|
|
799
799
|
*/
|
|
800
800
|
parent(): Promise<ParentData>;
|
|
801
801
|
/**
|
|
802
|
-
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](/docs/modules#$app-navigation-invalidate) to cause `load` to rerun.
|
|
802
|
+
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://kit.svelte.dev/docs/modules#$app-navigation-invalidate) to cause `load` to rerun.
|
|
803
803
|
*
|
|
804
804
|
* Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`.
|
|
805
805
|
*
|
|
@@ -1223,7 +1223,7 @@ export interface ServerLoadEvent<
|
|
|
1223
1223
|
*/
|
|
1224
1224
|
parent(): Promise<ParentData>;
|
|
1225
1225
|
/**
|
|
1226
|
-
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](/docs/modules#$app-navigation-invalidate) to cause `load` to rerun.
|
|
1226
|
+
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://kit.svelte.dev/docs/modules#$app-navigation-invalidate) to cause `load` to rerun.
|
|
1227
1227
|
*
|
|
1228
1228
|
* Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`.
|
|
1229
1229
|
*
|
|
@@ -270,7 +270,9 @@ export async function dev(vite, vite_config, svelte_config) {
|
|
|
270
270
|
|
|
271
271
|
/** @param {Error} error */
|
|
272
272
|
function fix_stack_trace(error) {
|
|
273
|
-
|
|
273
|
+
try {
|
|
274
|
+
vite.ssrFixStacktrace(error);
|
|
275
|
+
} catch {}
|
|
274
276
|
return error.stack;
|
|
275
277
|
}
|
|
276
278
|
|
|
@@ -391,32 +393,26 @@ export async function dev(vite, vite_config, svelte_config) {
|
|
|
391
393
|
};
|
|
392
394
|
|
|
393
395
|
vite.middlewares.use((req, res, next) => {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}`;
|
|
396
|
+
const base = `${vite.config.server.https ? 'https' : 'http'}://${
|
|
397
|
+
req.headers[':authority'] || req.headers.host
|
|
398
|
+
}`;
|
|
398
399
|
|
|
399
|
-
|
|
400
|
+
const decoded = decodeURI(new URL(base + req.url).pathname);
|
|
400
401
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
if (decoded.startsWith(assets)) {
|
|
403
|
+
const pathname = decoded.slice(assets.length);
|
|
404
|
+
const file = svelte_config.kit.files.assets + pathname;
|
|
404
405
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
406
|
+
if (fs.existsSync(file) && !fs.statSync(file).isDirectory()) {
|
|
407
|
+
if (has_correct_case(file, svelte_config.kit.files.assets)) {
|
|
408
|
+
req.url = encodeURI(pathname); // don't need query/hash
|
|
409
|
+
asset_server(req, res);
|
|
410
|
+
return;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
|
|
414
|
-
next();
|
|
415
|
-
} catch (e) {
|
|
416
|
-
const error = coalesce_to_error(e);
|
|
417
|
-
res.statusCode = 500;
|
|
418
|
-
res.end(fix_stack_trace(error));
|
|
419
413
|
}
|
|
414
|
+
|
|
415
|
+
next();
|
|
420
416
|
});
|
|
421
417
|
|
|
422
418
|
const env = loadEnv(vite_config.mode, svelte_config.kit.env.dir, '');
|
|
@@ -35,10 +35,6 @@ import {
|
|
|
35
35
|
sveltekit_server
|
|
36
36
|
} from './module_ids.js';
|
|
37
37
|
import { resolve_peer_dependency } from '../../utils/import.js';
|
|
38
|
-
import {
|
|
39
|
-
APP_VERSION_PLACEHOLDER_BASE,
|
|
40
|
-
APP_VERSION_HASH_PLACEHOLDER_BASE
|
|
41
|
-
} from '../../constants.js';
|
|
42
38
|
|
|
43
39
|
const cwd = process.cwd();
|
|
44
40
|
|
|
@@ -188,16 +184,7 @@ async function kit({ svelte_config }) {
|
|
|
188
184
|
const { kit } = svelte_config;
|
|
189
185
|
const out = `${kit.outDir}/output`;
|
|
190
186
|
|
|
191
|
-
const
|
|
192
|
-
const version_hash = hash(app_version);
|
|
193
|
-
|
|
194
|
-
// if the app version or hash is longer than the placeholder, we need to pad it to avoid
|
|
195
|
-
// source map damage
|
|
196
|
-
const app_version_placeholder = APP_VERSION_PLACEHOLDER_BASE.padEnd(app_version.length, '_');
|
|
197
|
-
const app_version_hash_placeholder = APP_VERSION_HASH_PLACEHOLDER_BASE.padEnd(
|
|
198
|
-
version_hash.length,
|
|
199
|
-
'_'
|
|
200
|
-
);
|
|
187
|
+
const version_hash = hash(kit.version.name);
|
|
201
188
|
|
|
202
189
|
/** @type {import('vite').ResolvedConfig} */
|
|
203
190
|
let vite_config;
|
|
@@ -397,7 +384,7 @@ async function kit({ svelte_config }) {
|
|
|
397
384
|
const browser = !options?.ssr;
|
|
398
385
|
|
|
399
386
|
const global = is_build
|
|
400
|
-
? `globalThis.__sveltekit_${
|
|
387
|
+
? `globalThis.__sveltekit_${version_hash}`
|
|
401
388
|
: 'globalThis.__sveltekit_dev';
|
|
402
389
|
|
|
403
390
|
if (options?.ssr === false && process.env.TEST !== 'true') {
|
|
@@ -483,8 +470,10 @@ async function kit({ svelte_config }) {
|
|
|
483
470
|
}
|
|
484
471
|
|
|
485
472
|
case sveltekit_environment: {
|
|
473
|
+
const { version } = svelte_config.kit;
|
|
474
|
+
|
|
486
475
|
return dedent`
|
|
487
|
-
export const version = ${
|
|
476
|
+
export const version = ${s(version.name)};
|
|
488
477
|
export let building = false;
|
|
489
478
|
export let prerendering = false;
|
|
490
479
|
|
|
@@ -934,50 +923,7 @@ async function kit({ svelte_config }) {
|
|
|
934
923
|
}
|
|
935
924
|
};
|
|
936
925
|
|
|
937
|
-
|
|
938
|
-
const plugin_replace_version_and_hash = {
|
|
939
|
-
name: 'vite-plugin-svelte-replace-version-and-hash',
|
|
940
|
-
enforce: 'post',
|
|
941
|
-
|
|
942
|
-
generateBundle(_, bundle, __) {
|
|
943
|
-
if (vite_config.build.ssr) return;
|
|
944
|
-
|
|
945
|
-
for (const file in bundle) {
|
|
946
|
-
if (bundle[file].type !== 'chunk') continue;
|
|
947
|
-
const chunk = /** @type {import('rollup').OutputChunk} */ (bundle[file]);
|
|
948
|
-
let code = chunk.code;
|
|
949
|
-
if (
|
|
950
|
-
!(code.includes(app_version_placeholder) || code.includes(app_version_hash_placeholder))
|
|
951
|
-
)
|
|
952
|
-
continue;
|
|
953
|
-
|
|
954
|
-
// replace the version and version after the chunk hash has already been calculated
|
|
955
|
-
// to avoid affecting the chunk hash
|
|
956
|
-
const substitutions = [
|
|
957
|
-
[app_version_hash_placeholder, version_hash],
|
|
958
|
-
[app_version_placeholder, JSON.stringify(kit.version.name)]
|
|
959
|
-
];
|
|
960
|
-
|
|
961
|
-
for (const [placeholder, replacement] of substitutions) {
|
|
962
|
-
code = code.replaceAll(
|
|
963
|
-
placeholder,
|
|
964
|
-
// pad the replacement to mitigate source map changes
|
|
965
|
-
replacement.padEnd(placeholder.length, ' ')
|
|
966
|
-
);
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
chunk.code = code;
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
};
|
|
973
|
-
|
|
974
|
-
return [
|
|
975
|
-
plugin_setup,
|
|
976
|
-
plugin_virtual_modules,
|
|
977
|
-
plugin_guard,
|
|
978
|
-
plugin_compile,
|
|
979
|
-
plugin_replace_version_and_hash
|
|
980
|
-
];
|
|
926
|
+
return [plugin_setup, plugin_virtual_modules, plugin_guard, plugin_compile];
|
|
981
927
|
}
|
|
982
928
|
|
|
983
929
|
/**
|
|
@@ -1543,7 +1543,10 @@ function setup_preload() {
|
|
|
1543
1543
|
|
|
1544
1544
|
const options = get_router_options(a);
|
|
1545
1545
|
|
|
1546
|
-
|
|
1546
|
+
// we don't want to preload data for a page we're already on
|
|
1547
|
+
const same_url = url && current.url.pathname + current.url.search === url.pathname + url.search;
|
|
1548
|
+
|
|
1549
|
+
if (!options.reload && !same_url) {
|
|
1547
1550
|
if (priority <= options.preload_data) {
|
|
1548
1551
|
const intent = get_navigation_intent(url, false);
|
|
1549
1552
|
if (intent) {
|
|
@@ -162,17 +162,3 @@ export function stringify_uses(node) {
|
|
|
162
162
|
|
|
163
163
|
return `"uses":{${uses.join(',')}}`;
|
|
164
164
|
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @param {string} message
|
|
168
|
-
* @param {number} offset
|
|
169
|
-
*/
|
|
170
|
-
export function warn_with_callsite(message, offset = 0) {
|
|
171
|
-
if (DEV) {
|
|
172
|
-
const stack = fix_stack_trace(new Error()).split('\n');
|
|
173
|
-
const line = stack.at(3 + offset);
|
|
174
|
-
message += `\n${line}`;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
console.warn(message);
|
|
178
|
-
}
|
|
@@ -2,4 +2,4 @@ This is a simple alias to `src/lib`, or whatever directory is specified as [`con
|
|
|
2
2
|
|
|
3
3
|
### `$lib/server`
|
|
4
4
|
|
|
5
|
-
A subdirectory of `$lib`. SvelteKit will prevent you from importing any modules in `$lib/server` into client-side code. See [server-only modules](/docs/server-only-modules).
|
|
5
|
+
A subdirectory of `$lib`. SvelteKit will prevent you from importing any modules in `$lib/server` into client-side code. See [server-only modules](https://kit.svelte.dev/docs/server-only-modules).
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -378,12 +378,12 @@ declare module '@sveltejs/kit' {
|
|
|
378
378
|
*/
|
|
379
379
|
dir?: string;
|
|
380
380
|
/**
|
|
381
|
-
* A prefix that signals that an environment variable is safe to expose to client-side code. See [`$env/static/public`](/docs/modules#$env-static-public) and [`$env/dynamic/public`](/docs/modules#$env-dynamic-public). Note that Vite's [`envPrefix`](https://vitejs.dev/config/shared-options.html#envprefix) must be set separately if you are using Vite's environment variable handling - though use of that feature should generally be unnecessary.
|
|
381
|
+
* A prefix that signals that an environment variable is safe to expose to client-side code. See [`$env/static/public`](https://kit.svelte.dev/docs/modules#$env-static-public) and [`$env/dynamic/public`](https://kit.svelte.dev/docs/modules#$env-dynamic-public). Note that Vite's [`envPrefix`](https://vitejs.dev/config/shared-options.html#envprefix) must be set separately if you are using Vite's environment variable handling - though use of that feature should generally be unnecessary.
|
|
382
382
|
* @default "PUBLIC_"
|
|
383
383
|
*/
|
|
384
384
|
publicPrefix?: string;
|
|
385
385
|
/**
|
|
386
|
-
* A prefix that signals that an environment variable is unsafe to expose to client-side code. Environment variables matching neither the public nor the private prefix will be discarded completely. See [`$env/static/private`](/docs/modules#$env-static-private) and [`$env/dynamic/private`](/docs/modules#$env-dynamic-private).
|
|
386
|
+
* A prefix that signals that an environment variable is unsafe to expose to client-side code. Environment variables matching neither the public nor the private prefix will be discarded completely. See [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private) and [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private).
|
|
387
387
|
* @default ""
|
|
388
388
|
* @since 1.21.0
|
|
389
389
|
*/
|
|
@@ -486,7 +486,7 @@ declare module '@sveltejs/kit' {
|
|
|
486
486
|
*/
|
|
487
487
|
assets?: '' | `http://${string}` | `https://${string}`;
|
|
488
488
|
/**
|
|
489
|
-
* A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](/docs/modules#$app-paths-base) for that: `<a href="{base}/your-page">Link</a>`. If you find yourself writing this often, it may make sense to extract this into a reusable component.
|
|
489
|
+
* A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](https://kit.svelte.dev/docs/modules#$app-paths-base) for that: `<a href="{base}/your-page">Link</a>`. If you find yourself writing this often, it may make sense to extract this into a reusable component.
|
|
490
490
|
* @default ""
|
|
491
491
|
*/
|
|
492
492
|
base?: '' | `/${string}`;
|
|
@@ -628,7 +628,7 @@ declare module '@sveltejs/kit' {
|
|
|
628
628
|
* </script>
|
|
629
629
|
* ```
|
|
630
630
|
*
|
|
631
|
-
* If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of the [`updated`](/docs/modules#$app-stores-updated) store to `true` when it detects one.
|
|
631
|
+
* If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of the [`updated`](https://kit.svelte.dev/docs/modules#$app-stores-updated) store to `true` when it detects one.
|
|
632
632
|
*/
|
|
633
633
|
version?: {
|
|
634
634
|
/**
|
|
@@ -781,7 +781,7 @@ declare module '@sveltejs/kit' {
|
|
|
781
781
|
*/
|
|
782
782
|
parent(): Promise<ParentData>;
|
|
783
783
|
/**
|
|
784
|
-
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](/docs/modules#$app-navigation-invalidate) to cause `load` to rerun.
|
|
784
|
+
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://kit.svelte.dev/docs/modules#$app-navigation-invalidate) to cause `load` to rerun.
|
|
785
785
|
*
|
|
786
786
|
* Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`.
|
|
787
787
|
*
|
|
@@ -1205,7 +1205,7 @@ declare module '@sveltejs/kit' {
|
|
|
1205
1205
|
*/
|
|
1206
1206
|
parent(): Promise<ParentData>;
|
|
1207
1207
|
/**
|
|
1208
|
-
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](/docs/modules#$app-navigation-invalidate) to cause `load` to rerun.
|
|
1208
|
+
* This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://kit.svelte.dev/docs/modules#$app-navigation-invalidate) to cause `load` to rerun.
|
|
1209
1209
|
*
|
|
1210
1210
|
* Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`.
|
|
1211
1211
|
*
|
package/types/index.d.ts.map
CHANGED
|
@@ -154,6 +154,6 @@
|
|
|
154
154
|
null,
|
|
155
155
|
null
|
|
156
156
|
],
|
|
157
|
-
"mappings": ";;;;;;;;;kBA2BiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2BZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;;;;;;;;kBAeTC,aAAaA;;;;;;;;;;;;;;;;;kBAiBbC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkGPC,MAAMA;;;;;;;;;;;;;;;;;;;;;kBAqBNC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4DPC,QAAQA;;;;;;;;kBAQRC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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