Skip to content
Merged

day 19 #1045

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ When Svelte emits a warning or error (whether at build time, when the compiler i

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.

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

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

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

## Day 19
## Day 19: single-file SvelteKit bundles

Coming soon!
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.

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.

- [docs](/docs/kit/configuration#output)
- [example](https://bsky.app/profile/svelte.dev/post/3ldo633ht222p)

## Day 20

Expand Down
Loading