Skip to content

Commit 1251359

Browse files
authored
Merge branch 'main' into fix-as-such
2 parents 91a6e0d + 55780a6 commit 1251359

File tree

24 files changed

+151
-66
lines changed

24 files changed

+151
-66
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: "What's new in Svelte: August 2025"
3+
description: 'Async Svelte is out - with all the fixins'
4+
author: Dani Sandoval
5+
authorURL: https://dreamindani.com
6+
---
7+
8+
With [Async Svelte](https://github.com/sveltejs/svelte/discussions/15845) and its companion [Remote Functions](https://github.com/sveltejs/kit/discussions/13897) officially out in the world, there's a lot of updates to share!
9+
10+
Be sure to check out the showcase for videos from Rich, Paolo, and Stanislav about all the brand new features in Svelte.
11+
12+
Let's dive into the highlights...
13+
14+
## What's new in Svelte, SvelteKit, Language Tools and CLI (sv)
15+
16+
- Remote functions can be called anywhere in your app, but always run on the server, and as such can safely access server-only modules containing things like environment variables and database clients (**[email protected]**, [Docs](https://svelte.dev/docs/kit/remote-functions), [#13986](https://github.com/sveltejs/kit/pull/13986))
17+
- `getAbortSignal` returns an `AbortSignal` that aborts when the current derived or effect re-runs or is destroyed (**[email protected]**, [Docs](https://svelte.dev/docs/svelte/svelte#getAbortSignal), [#16266](https://github.com/sveltejs/svelte/pull/16266))
18+
- A new `parent` property has been added to the `__svelte_meta` properties that are added to elements at dev time - useful for debugging nested hierarchies (**[email protected]**, [#16255](https://github.com/sveltejs/svelte/pull/16255))
19+
- `await` is now supported in components when using the `experimental.async` compiler option (**[email protected]/[email protected]**, [Docs](https://svelte.dev/docs/svelte/await-expressions), [#15844](https://github.com/sveltejs/svelte/pull/15844))
20+
- There are now types for the `params` prop and `page` attributes in page/layout components (**[email protected], [email protected] & [email protected]**, [#13999](https://github.com/sveltejs/kit/pull/13999) / [#13864](https://github.com/sveltejs/kit/pull/13864))
21+
- SvelteKit's `read` now works in edge environments where `fs.readFile` isn't available such as in Cloudflare's workers, Netlify, and Vercel's edge functions (**[email protected]**, [#13859](https://github.com/sveltejs/kit/pull/13859))
22+
- The `resolve(...)` and `asset(...)` helpers have been added for resolving paths (**[email protected]**, [#13864](https://github.com/sveltejs/kit/pull/13864))
23+
- Support for modern SvelteKit prop typings has been added to VS Code snippets (**extensions-109.10.0**, [#2796](https://github.com/sveltejs/language-tools/pull/2796))
24+
- The new `vite.addPlugin` simplifies adding a plugin on various vite config styles (**[email protected]**, [#633](https://github.com/sveltejs/cli/pull/633))
25+
- vite-plugin-svelte is out with support for vite7, rolldown-vite and [more](https://github.com/sveltejs/vite-plugin-svelte/blob/main/packages/vite-plugin-svelte/CHANGELOG.md)
26+
27+
For a full list of bug fixes in Svelte, SvelteKit and its adapters, check out their CHANGELOGs [here](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md) and [here](https://github.com/sveltejs/kit/tree/main/packages).
28+
29+
---
30+
31+
## Community Showcase
32+
33+
### Apps & Sites built with Svelte
34+
35+
- [Logitech's new site](https://www.reddit.com/r/sveltejs/comments/1m991ts/the_logitech_site_is_built_with_svelte/) is built in Svelte 🎉
36+
- [hend.world](https://hend.world/) is a language learning application that surrounds you with comprehensible input: compelling stories, articles, and videos that match your level
37+
- [Amgiflol](https://github.com/sm17p/amgiflol) is a Figma-like Layout Inspector For Web
38+
- [Formcord](https://formcord.app/) is a Google Forms alternative built specifically for Discord communities
39+
- [Freq](https://www.freq.social/) is a community-based social media platform for groups of music listeners to share, talk about, and enjoy music together
40+
- [Salora](https://salora.app/) is a salon booking application (de)
41+
- [Animal Well Shrine](https://anxpara.com/animalwellshrine) is an low-spoiler egg tracker for the video game, Animal Well
42+
- [TypingGym](https://www.typinggym.com/) is a typing practice site with automatic difficulty adjustment
43+
44+
### Learning Resources
45+
46+
_Featuring Svelte Contributors and Ambassadors_
47+
48+
- [promise.then(...)](https://www.youtube.com/watch?v=e-1pVKUWlOQ) by Rich Harris - what's next now that Svelte is Async
49+
- [Asynchronous Svelte](https://www.youtube.com/live/kL4Tp8RmJwo) with Rich Harris by CodeTV (Jason Lengstorf)
50+
- [Remote Functions are coming to SvelteKit - and they are amazing!](https://www.youtube.com/watch?v=BID8r5LObvI) by Code with Stanislav
51+
- [Svelte London - June 2025](https://www.youtube.com/watch?v=LKSmlp2S-jQ) feat. "Svelte, svelte everywhere" by Paolo Ricciuti and "Testing your Svelte app in an actual browser" by Willow / Scott
52+
53+
_This Week in Svelte_
54+
55+
- [Ep. 108](https://www.youtube.com/watch?v=Sp4Y1tMo5AQ) — Svelte Flow
56+
- [Ep. 109](https://www.youtube.com/watch?v=LghoZmFzWYM) — Ark UI
57+
- [Ep. 110](https://www.youtube.com/watch?v=Ia8N6S2OkpM) — Neodrag v3
58+
- [Ep. 111](https://www.youtube.com/watch?v=fExlOwTtZqM) — Best LLMs for Svelte 5 tested, MCP server, llms.txt
59+
60+
_Svienna (Svelte Society Vienna)_
61+
62+
- [Lightning talk 10 tips in 5 mins!](https://www.youtube.com/watch?v=hptgxIdnDdg) by Jean Yves Couet
63+
- [Using SvelteKit and MIT appinventor to inspire young girls for tech](https://www.youtube.com/watch?v=pDx1a078in8) by Domenik Reitzner
64+
- [Adding full to your full stack SvelteKit app](https://www.youtube.com/watch?v=A3cqzv-zRe8) by Jean Yves Couet
65+
- [ZeeltePHP (Svelte + PHP)](https://www.youtube.com/watch?v=0sm4oPwvPVU) by derharry
66+
- [Svelte at Geizhals](https://www.youtube.com/watch?v=aJVdfPk9WmI) by Martin Grubinger
67+
68+
_To Watch/Read_
69+
70+
- [Build a SvelteKit Admin App with Drizzle, Tailwind & Postgres](https://www.youtube.com/watch?v=H3Mk6ozq69U) by Tyler Codes
71+
- [Master Svelte in 15 Minutes: From React Dev to Svelte Pro](https://www.youtube.com/watch?v=Vhfcgnt5nO8) by Neuronfire
72+
- [Simple but Effective Skeleton Loaders](https://www.matsimon.dev/blog/simple-skeleton-loaders) by Mat Simon
73+
- [Building Smart Intervals with Svelte 5](https://www.puruvj.dev/blog/svelte-5-interval-rune) by Puru VJ
74+
75+
### Libraries, Tools & Components
76+
77+
- [Svelte Interval](https://github.com/PuruVJ/svelte-interval) is a comprehensive Svelte utility package for managing intervals with reactive durations, synchronization, and advanced control features
78+
- [@hvniel/svelte-router](https://github.com/HanielU/svelte-router) is a Svelte 5 port of React Router
79+
- [@hvniel/vite-plugin-svelte-inline-component](https://github.com/hanielu/vite-plugin-svelte-inline-component) lets you write tiny Svelte components straight inside your JavaScript / TypeScript tests using tagged‑template literals
80+
- [wuchale](https://github.com/wuchalejs/wuchale) is a non-invasive, normal code based compile-time internationalization (i18n) toolkit
81+
- [SSGOI](https://github.com/meursyphus/ssgoi) brings native app-like page transitions to the web
82+
- [Svelte Form Builder](https://github.com/moalamri/svelte-form-builder) is a modern, drag-and-drop form builder built with Svelte 5
83+
- [Svelte persistent runes](https://github.com/MacFJA/svelte-persistent-runes?tab=readme-ov-file#svelte-persistent-runes) provides a Svelte reactive rune that keep its value through pages and reloads
84+
- [gositemap](https://github.com/lelabdev/gositemap) is a fast, test-driven sitemap.xml generator for static SvelteKit sites
85+
86+
That's it for this month! Let us know if we missed anything on [Reddit](https://www.reddit.com/r/sveltejs/) or [Discord](https://discord.gg/svelte).
87+
88+
Until next time 👋🏼!

apps/svelte.dev/content/docs/cli/20-commands/20-sv-add.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can select multiple space-separated add-ons from [the list below](#Official-
2020
## Options
2121

2222
- `-C`, `--cwd` — path to the root of your Svelte(Kit) project
23-
- `--no-preconditions`skip checking preconditions <!-- TODO what does this mean? -->
23+
- `--no-git-check`even if some files are dirty, no prompt will be shown
2424
- `--install` — installs dependencies with a specified package manager
2525
- `--no-install` — prevents installing dependencies
2626

apps/svelte.dev/content/docs/kit/10-getting-started/20-creating-a-project.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ The easiest way to start building a SvelteKit app is to run `npx sv create`:
88
```sh
99
npx sv create my-app
1010
cd my-app
11-
npm install
1211
npm run dev
1312
```
1413

15-
The first command will scaffold a new project in the `my-app` directory asking you if you'd like to set up some basic tooling such as TypeScript. See [integrations](./integrations) for pointers on setting up additional tooling. The subsequent commands will then install its dependencies and start a server on [localhost:5173](http://localhost:5173).
14+
The first command will scaffold a new project in the `my-app` directory asking if you'd like to set up some basic tooling such as TypeScript. See [the CLI docs](/docs/cli/overview) for information about these options and [the integrations page](./integrations) for pointers on setting up additional tooling. `npm run dev` will then start the development server on [localhost:5173](http://localhost:5173) - make sure you install dependencies before running this if you didn't do so during project creation.
1615

1716
There are two basic concepts:
1817

apps/svelte.dev/content/docs/kit/20-core-concepts/20-load.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Conceptually, they're the same thing, but there are some important differences t
189189

190190
Server `load` functions _always_ run on the server.
191191

192-
By default, universal `load` functions run on the server during SSR when the user first visits your page. They will then run again during hydration, reusing any responses from [fetch requests](#Making-fetch-requests). All subsequent invocations of universal `load` functions happen in the browser. You can customize the behavior through [page options](page-options). If you disable [server side rendering](page-options#ssr), you'll get an SPA and universal `load` functions _always_ run on the client.
192+
By default, universal `load` functions run on the server during SSR when the user first visits your page. They will then run again during hydration, reusing any responses from [fetch requests](#Making-fetch-requests). All subsequent invocations of universal `load` functions happen in the browser. You can customize the behavior through [page options](page-options). If you disable [server-side rendering](page-options#ssr), you'll get an SPA and universal `load` functions _always_ run on the client.
193193

194194
If a route contains both universal and server `load` functions, the server `load` runs first.
195195

apps/svelte.dev/content/docs/kit/20-core-concepts/60-remote-functions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Remote functions
77
<p>Available since 2.27</p>
88
</blockquote>
99

10-
Remote functions are a tool for type-safe communication between client and server. They can be _called_ anywhere in your app, but always _run_ on the server, and as such can safely access [server-only modules](server-only-modules) containing things like environment variables and database clients.
10+
Remote functions are a tool for type-safe communication between client and server. They can be _called_ anywhere in your app, but always _run_ on the server, meaning they can safely access [server-only modules](server-only-modules) containing things like environment variables and database clients.
1111

1212
Combined with Svelte's experimental support for [`await`](/docs/svelte/await-expressions), it allows you to load and manipulate data directly inside your components.
1313

@@ -26,7 +26,7 @@ export default {
2626

2727
## Overview
2828

29-
Remote functions are exported from a `.remote.js` or `.remote.ts` file, and come in four flavours: `query`, `form`, `command` and `prerender`. On the client, the exported functions are transformed to `fetch` wrappers that invoke their counterparts on the server via a generated HTTP endpoint.
29+
Remote functions are exported from a `.remote.js` or `.remote.ts` file, and come in four flavours: `query`, `form`, `command` and `prerender`. On the client, the exported functions are transformed to `fetch` wrappers that invoke their counterparts on the server via a generated HTTP endpoint. Remote files must be placed in the `lib` or `routes` directory.
3030

3131
## query
3232

@@ -114,7 +114,7 @@ Query functions can accept an argument, such as the `slug` of an individual post
114114

115115
let { params } = $props();
116116

117-
const post = getPost(params.slug);
117+
const post = $derived(await getPost(params.slug));
118118
</script>
119119

120120
<h1>{post.title}</h1>
@@ -161,7 +161,7 @@ Any query can be updated via its `refresh` method:
161161
</button>
162162
```
163163
164-
> [!NOTE] Queries are cached while they're on the page, meaning `getPosts() === getPosts()`. As such, you don't need a reference like `const posts = getPosts()` in order to refresh the query.
164+
> [!NOTE] Queries are cached while they're on the page, meaning `getPosts() === getPosts()`. This means you don't need a reference like `const posts = getPosts()` in order to refresh the query.
165165
166166
## form
167167
@@ -271,7 +271,7 @@ export const createPost = form(async (data) => {
271271

272272
// Refresh `getPosts()` on the server, and send
273273
// the data back with the result of `createPost`
274-
+++getPosts().refresh();+++
274+
+++await getPosts().refresh();+++
275275

276276
// Redirect to the newly created page
277277
redirect(303, `/blog/${slug}`);
@@ -657,7 +657,7 @@ export const getPost = prerender(
657657
);
658658
```
659659
660-
> [!NOTE] Svelte does not yet support asynchronous server-side rendering, and as such it's likely that you're only calling remote functions from the browser, rather than during prerendering. Because of this you will need to use `inputs`, for now. We're actively working on this roadblock.
660+
> [!NOTE] Svelte does not yet support asynchronous server-side rendering, so it's likely that you're only calling remote functions from the browser, rather than during prerendering. Because of this, you will need to use `inputs`, for now. We're actively working on this roadblock.
661661
662662
By default, prerender functions are excluded from your server bundle, which means that you cannot call them with any arguments that were _not_ prerendered. You can set `dynamic: true` to change this behaviour:
663663

apps/svelte.dev/content/docs/kit/25-build-and-deploy/60-adapter-cloudflare.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ When deploying your application, the server generated by SvelteKit is bundled in
185185

186186
### Accessing the file system
187187

188-
You can't use `fs` in Cloudflare Workers — you must [prerender](page-options#prerender) the routes in question.
188+
You can't use `fs` in Cloudflare Workers.
189+
190+
Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. It works by fetching the file from the deployed public assets location.
191+
192+
Alternatively, you can [prerender](page-options#prerender) the routes in question.
189193

190194
## Migrating from Workers Sites
191195

apps/svelte.dev/content/docs/kit/25-build-and-deploy/80-adapter-netlify.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,6 @@ Additionally, you can add your own Netlify functions by creating a directory for
118118

119119
You can't use `fs` in edge deployments.
120120

121-
You _can_ use it in serverless deployments, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. `read` does not work inside edge deployments (this may change in future).
121+
You _can_ use it in serverless deployments, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. It also works inside edge deployments by fetching the file from the deployed public assets location.
122122

123123
Alternatively, you can [prerender](page-options#prerender) the routes in question.

apps/svelte.dev/content/docs/kit/25-build-and-deploy/90-adapter-vercel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,6 @@ Projects created before a certain date may default to using an older Node versio
195195

196196
You can't use `fs` in edge functions.
197197

198-
You _can_ use it in serverless functions, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. `read` does not work inside routes deployed as edge functions (this may change in future).
198+
You _can_ use it in serverless functions, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. It also works inside routes deployed as edge functions by fetching the file from the deployed public assets location.
199199

200200
Alternatively, you can [prerender](page-options#prerender) the routes in question.

apps/svelte.dev/content/docs/kit/30-advanced/40-service-workers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ navigator.serviceWorker.register('/service-worker.js', {
127127

128128
Setting up proper types for service workers requires some manual setup. Inside your `service-worker.js`, add the following to the top of your file:
129129

130-
```original-js
130+
```js
131131
/// <reference types="@sveltejs/kit" />
132132
/// <reference no-default-lib="true"/>
133133
/// <reference lib="esnext" />
134134
/// <reference lib="webworker" />
135135

136136
const sw = /** @type {ServiceWorkerGlobalScope} */ (/** @type {unknown} */ (self));
137137
```
138-
```generated-ts
138+
```ts
139139
/// <reference types="@sveltejs/kit" />
140140
/// <reference no-default-lib="true"/>
141141
/// <reference lib="esnext" />

apps/svelte.dev/content/docs/kit/60-appendix/30-migrating-to-sveltekit-2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ This inconsistency is fixed in version 2. Paths are either always relative or al
9191

9292
## Server fetches are not trackable anymore
9393

94-
Previously it was possible to track URLs from `fetch`es on the server in order to rerun load functions. This poses a possible security risk (private URLs leaking), and as such it was behind the `dangerZone.trackServerFetches` setting, which is now removed.
94+
Previously it was possible to track URLs from `fetch`es on the server in order to rerun load functions. This poses a possible security risk (private URLs leaking), and for this reason it was behind the `dangerZone.trackServerFetches` setting, which is now removed.
9595

9696
## `preloadCode` arguments must be prefixed with `base`
9797

@@ -105,7 +105,7 @@ Additionally, `preloadCode` now takes a single argument rather than _n_ argument
105105

106106
SvelteKit 1 included a function called `resolvePath` which allows you to resolve a route ID (like `/blog/[slug]`) and a set of parameters (like `{ slug: 'hello' }`) to a pathname. Unfortunately the return value didn't include the `base` path, limiting its usefulness in cases where `base` was set.
107107

108-
As such, SvelteKit 2 replaces `resolvePath` with a (slightly better named) function called `resolveRoute`, which is imported from `$app/paths` and which takes `base` into account.
108+
For this reason, SvelteKit 2 replaces `resolvePath` with a (slightly better named) function called `resolveRoute`, which is imported from `$app/paths` and which takes `base` into account.
109109

110110
```js
111111
---import { resolvePath } from '@sveltejs/kit';
@@ -128,7 +128,7 @@ SvelteKit 2 cleans this up by calling `handleError` hooks with two new propertie
128128

129129
The `$env/dynamic/public` and `$env/dynamic/private` modules provide access to _run time_ environment variables, as opposed to the _build time_ environment variables exposed by `$env/static/public` and `$env/static/private`.
130130

131-
During prerendering in SvelteKit 1, they are one and the same. As such, prerendered pages that make use of 'dynamic' environment variables are really 'baking in' build time values, which is incorrect. Worse, `$env/dynamic/public` is populated in the browser with these stale values if the user happens to land on a prerendered page before navigating to dynamically-rendered pages.
131+
During prerendering in SvelteKit 1, they are one and the same. This means that prerendered pages that make use of 'dynamic' environment variables are really 'baking in' build time values, which is incorrect. Worse, `$env/dynamic/public` is populated in the browser with these stale values if the user happens to land on a prerendered page before navigating to dynamically-rendered pages.
132132

133133
Because of this, dynamic environment variables can no longer be read during prerendering in SvelteKit 2 — you should use the `static` modules instead. If the user lands on a prerendered page, SvelteKit will request up-to-date values for `$env/dynamic/public` from the server (by default from a module called `/_app/env.js`) instead of reading them from the server-rendered HTML.
134134

0 commit comments

Comments
 (0)