|
| 1 | +--- |
| 2 | +title: "What's new in Svelte: February 2024" |
| 3 | +description: 'New in Kit: `reroute`, `emulate` and more!' |
| 4 | +author: Dani Sandoval |
| 5 | +authorURL: https://dreamindani.com |
| 6 | +--- |
| 7 | + |
| 8 | +Since SvelteKit 2.0 released late last year, there's been a bunch of new features to make the Kit dev experience even better! Meanwhile the Svelte team has been hard at work making Svelte 5 a reality. |
| 9 | + |
| 10 | +In case you missed it, Rich also posted [Tenets](https://github.com/sveltejs/svelte/discussions/10085#discussion-6029409), "an attempt to articulate the Svelte philosophy — our bedrock principles, that guide our design decisions." |
| 11 | + |
| 12 | +So let's dive in to check out what's new and see what the rest of the community has been up to... |
| 13 | + |
| 14 | +## What's new in SvelteKit |
| 15 | + |
| 16 | +- The client router is now tree shakeable (**2.1.0**, [#11340](https://github.com/sveltejs/kit/pull/11340)) |
| 17 | +- `$env/static/public` is now exposed in service workers (**2.2.0**, [Docs](https://kit.svelte.dev/docs/modules#env-static-public), [#10994](https://github.com/sveltejs/kit/pull/10994)) |
| 18 | +- `style-src-elem` is now supported in environments with a Content Security Policy (**2.2.1**, [Docs](https://kit.svelte.dev/docs/types#private-types-cspdirectives), [#11562](https://github.com/sveltejs/kit/pull/11562)) |
| 19 | +- The new `reroute` hook allows you to change how URLs are translated into routes (**2.3.0**, [Docs](https://kit.svelte.dev/docs/hooks#universal-hooks-reroute), [#11537](https://github.com/sveltejs/kit/pull/11537)) |
| 20 | +- The `read` function is now available in the `$app/server` module - allowing you to read assets from the filesystem (**2.4.0**, [Docs](https://kit.svelte.dev/docs/modules#app-server-read), [#11649](https://github.com/sveltejs/kit/pull/11649)) |
| 21 | +- Adapters can now `emulate` the prod environment for dev and preview servers by implementing the corresponding functions. This is useful for providing access to e.g. KV namespaces in development (**2.5.0**, [Docs](https://kit.svelte.dev/docs/writing-adapters), [#11730](https://github.com/sveltejs/kit/pull/11730)) |
| 22 | + |
| 23 | + |
| 24 | +## What's new in Svelte |
| 25 | + |
| 26 | +In case you missed it, [Svelte 5 is in preview](https://svelte-5-preview.vercel.app/docs/introduction). In the meantime, Svelte 4 (`@latest`) has had one bugfix release. There's just one new feature to highlight from the Svelte 5 changelog: |
| 27 | + |
| 28 | +- Snippets can now take multiple arguments (**5.0.0-next.42**, [Docs](https://svelte-5-preview.vercel.app/docs/snippets), [#9988](https://github.com/sveltejs/svelte/pull/9988)) |
| 29 | + |
| 30 | +For all the bug fixes, chores and underlying work required to get Svelte 5 to release-ready, check out [the CHANGELOG on main](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md). |
| 31 | + |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +## Community Showcase |
| 36 | + |
| 37 | +**Apps & Sites built with Svelte** |
| 38 | + |
| 39 | +- [Sprite Fusion](https://www.spritefusion.com/) is a free level design tool to craft beautiful 2D tilemaps right in your browser using any tileset |
| 40 | +- [TypeMeUp](https://github.com/bskdany/typemeup) a typing website that teaches you how to type faster |
| 41 | +- [Pathfinding Algorithm Visualizer](https://github.com/baterson/pathfinding-visualizer) is an interactive pathfinding algorithm visualizer with player functionality |
| 42 | +- [Roch Dog](https://rochdog.com/en) ranks businesses and hotels based on how dog-friendly they are |
| 43 | +- [highlight.cool](https://highlight.cool/) is a free, customizable, and real-time highlighting tool for your blog |
| 44 | +- [Nola Devs](https://www.noladevs.org/) is a vibrant and inclusive software developers group nestled in the heart of New Orleans. This site aggregates all their events across groups |
| 45 | +- [Startup Funding Simulator](https://www.fundingsimulator.com/) is a tool to help founders understand how modern fundraising (with safes) works, and how much dilution you can expect when raising money. |
| 46 | + |
| 47 | +**Learning Resources** |
| 48 | + |
| 49 | +_Featuring Svelte Contributors and Ambassadors_ |
| 50 | +- [New SvelteKit feature: `import { read } from '$app/server'`](https://www.youtube.com/watch?v=m4G-6dyF1MU) by Rich Harris |
| 51 | +- [Reading assets on the server in SvelteKit](https://geoffrich.net/posts/sveltekit-read/) by Geoff Rich |
| 52 | +- [Tan Li Hau's new book](https://packt.link/Z4hXD), _Real-World Svelte_ is out now |
| 53 | +- [Svelte Society San Diego - January 2024](https://www.youtube.com/watch?v=oH7XFAKh6W8): Attila covers the latest updates on Svelte 5 and also SvelteKit. |
| 54 | +- [Svelte London - January 2024](https://www.youtube.com/watch?v=eswNQiq4T2w): featuring talks from both Rich Harris and pngwn |
| 55 | +- [Svelte 5: Speed, Simplicity & Size](https://syntax.fm/show/723/svelte-5-speed-simplicity-and-size) by Syntax.FM |
| 56 | +- This Week in Svelte: |
| 57 | + - [12 Jan 2024](https://www.youtube.com/watch?v=86NNiIG_ncU): A deep dive into the SvelteKit Changelog |
| 58 | + - [19 Jan 2024](https://www.youtube.com/watch?v=AWL_xCPT-5Q): Showcasing a new library from Paolo Ricciuti |
| 59 | + - [26 Jan 2024](https://www.youtube.com/watch?v=_SraKYKkQAc): Featuring "Cells" - a functional and reactive programming library |
| 60 | + |
| 61 | +_To Read_ |
| 62 | + |
| 63 | +- [Customise font in TailwindCSS with SvelteKit](https://www.launchnow.pro/blog/customise-font-tailwindcss-sveltekit) by Launchnow |
| 64 | +- [Svelte from the perspective of an Angular developer (for Svelte devs)](https://kylenazario.com/blog/svelte-from-angular-perspective-for-svelte) and [How to create a sitemap for your SvelteKit blog](https://kylenazario.com/blog/sveltekit-blog-sitemap) by Kyle Nazario |
| 65 | +- [Get Up and Running with Svelte on the Internet Computer](https://blog.icacademy.at/blog/svelte-ic-starter) by Roland BOLE |
| 66 | +- [SvelteKit + Socket.io server deployed on deno](https://devr.me/socket-io-deno) by Devr |
| 67 | + |
| 68 | + |
| 69 | +**Libraries, Tools & Components** |
| 70 | + |
| 71 | +- [Lucia](https://github.com/lucia-auth/lucia/discussions/1361) - an auth library written in TypeScript that abstracts away the complexity of handling sessions - has just released its 3.0 version |
| 72 | +- [Paraglide JS Adapter SvelteKit](https://inlang.com/m/dxnzrydw/library-inlang-paraglideJsAdapterSvelteKit) is a SvelteKit integration for ParaglideJS - a tool for i18n routing |
| 73 | + |
| 74 | + |
| 75 | +That's it for this month! Feel free to let us know if we missed anything on [Reddit](https://www.reddit.com/r/sveltejs/) or [Discord](https://discord.gg/svelte). |
| 76 | + |
| 77 | +See ya next month! |
0 commit comments