Skip to content

Commit d88895c

Browse files
authored
day 19 (#1045)
* day 19 * merge main, use root-relative url
1 parent ee4395c commit d88895c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ When Svelte emits a warning or error (whether at build time, when the compiler i
8181

8282
A lot of you wanted a place to put asynchronous setup work that happens before your SvelteKit app starts up. You can now export an `init` function from `hooks.server.js` and `hooks.client.js` that will be awaited before any other stuff happens.
8383

84-
- [docs](https://svelte.dev/docs/kit/hooks#Shared-hooks-init)
84+
- [docs](/docs/kit/hooks#Shared-hooks-init)
8585

8686
## Day 11: `svelte/reactivity/window`
8787

@@ -151,9 +151,14 @@ The JS and CSS output tabs have also been upgraded — they now use sourcemaps t
151151
- [playground](/playground)
152152
- [demo video](https://bsky.app/profile/svelte.dev/post/3ldlkmce6oc2j)
153153

154-
## Day 19
154+
## Day 19: single-file SvelteKit bundles
155155

156-
Coming soon!
156+
By default, SvelteKit uses a technique called _code-splitting_ so that you only load the JavaScript and CSS you need for the page you're currently on. This helps make sure your app loads fast even if it grows very large.
157+
158+
In [some situations](https://github.com/sveltejs/kit/issues/3882), code-splitting is unhelpful — what you really want is a single .js file and a single .css file for your entire app. SvelteKit now supports this with the `output.bundleStrategy` option.
159+
160+
- [docs](/docs/kit/configuration#output)
161+
- [example](https://bsky.app/profile/svelte.dev/post/3ldo633ht222p)
157162

158163
## Day 20
159164

0 commit comments

Comments
 (0)