Zum Inhalt springen

Svelte Updates & Release Notes

Einträge
109
Quellen
1
Zuletzt aktualisiert

Folge Svelte, um die Release Notes in deinen Feed zu holen.

Svelte

Neuerungen in Svelte im Juni 2024

In Svelte 5 ist bind: auf Komponentenexports in runes mode verboten, das Migrationswerkzeug wurde verbessert, und MathML wird nun unterstützt.

The maintainers have been hard at work getting the Svelte 5 Release Candidate ready for release. In this month’s newsletter, you’ll find highlights from the pre-release CHANGELOG and a host of items from our community showcase.

Let’s dive in!

What’s new in Svelte

  • bind: is now disallowed on component exports in runes mode and has much better types to tell if a prop is $bindable (5.0.0-next.113, 114 and 125, Docs, #11238, #11225 and #11498)
  • Tons of work on the migrate tool to make migrating to Svelte 5 syntax easier (5.0.0-next.116, 136 and 137, Docs, #11334, #11659, #11704)
  • MathML is now supported (5.0.0-next.120, Docs, #11387) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte im Mai 2024

Auf dem Svelte Summit wurde bekannt gegeben, dass Svelte 5 in die Release-Candidate-Phase eintritt, mit Vorträgen und Community-Projekten im Rückblick.

Svelte Summit was last week - featuring a number of fantastic talks from across the community. In the final talk, What You Can Do For Your Framework, Rich Harris (with a little help from PuruVJ’s neoconfetti library) announced that Svelte 5 is now in the “Release Candidate”.

Lots of pre-release changes to cover in this post and a host of community showcase items... so let’s dive in!

Highlights from Svelte Summit Spring 2024

Below, you’ll find links to all the talks in the livestream version of Svelte Summit.

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte 5 erreicht Release-Candidate-Phase

Svelte 5 ist nun ein Release Candidate, mit weitgehend festgelegtem Design und behobenen Fehlern, aber noch nicht produktionsreif; Nutzer können es über npm oder die Vorschau-Website testen.

Svelte 5 is now in the Release Candidate phase. This means that the design of the framework is largely settled, with no anticipated breaking changes between now and the stable release, and that the most egregious bugs have been stomped.

It doesn’t mean that it’s ready for production, or that nothing will change between now and 5.0. But if you’ve held off on dabbling with Svelte 5 during the public beta phase, now is a great time to try it out. You can select the ‘Try the Svelte 5 preview’ option when starting a new SvelteKit project...

npm create svelte@latest

...or you can add Svelte 5 to an existing project...

npm install --save-dev svelte@next

...or you can tinker in the Svelte 5 Preview website.

I’m out of the loop. What’s Svelte 5?

For the last several months, we’ve been hard at work rewriting Svelte from the ground up to be faster, easier to use and more robust, applying the lessons we’ve collectively learned from several years of building apps with Svelte.

You can learn more about the new features from the preview documentation, and by watching the presentation from the most recent Svelte Summit:

What You Can Do For Your Framework

The highlights include: …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte im April 2024

Svelte 5 bietet neue reaktive Map-, Date- und Set-Klassen, und State, Derived und Props können nun wieder explizit aus Komponenten exportiert werden.

Spring is just around the corner (for half the globe at least), which means Svelte Summit Spring is coming soon! The event will be streamed on the Svelte Society YouTube channel on April 27.

Also, this month, a ton of new features have been merged into Svelte 5 to make it the best version of Svelte yet. We’ll get into them all below, so let’s jump right in!

What’s new in Svelte

Svelte 5 is in preview and gets closer to release every day. Below, you’ll find some highlights from its changelog:

  • The new Map, Date and Set classes can now be imported from svelte/reactivity and used just like their native counterparts to fit into Svelte’s reactivity model (5.0.0-next.79, Docs, #10803, #10622, #10781)
  • state/derived/props can be explicitly exported from components again (5.0.0-next.62, #10523) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte im März 2024

Svelte 5 hat $derived.call zu $derived.by umbenannt, verbesserte Reaktivität bei destrukturierten Objekten, einen tree-shakebaren hydrate-Methode und Unterstützung für verschachteltes CSS.

This month, the Svelte maintainers made a ton of progress on Svelte 5 and Rich Harris talked to Prismic about how the team is working on making the framework even better.

Lots to showcase too... so let’s dive in!

What’s new in Svelte

As you may already have heard, Svelte 5 is in preview. In the meantime, Svelte 4 (@latest) has had one bugfix. The Svelte 5 changelog has quite a few updates, though:

  • breaking: $derived.call is now $derived.by (5.0.0-next.54, Docs, #10445)
  • Destructuring derived object properties will now keep fine-grain reactivity (5.0.0-next.55, Docs, #10488)
  • The new hydrate method makes hydration-related code treeshakeable (5.0.0-next.56, Docs, #10497)
  • Nested CSS is now supported, along with better support for :is(...) and :where(...) (5.0.0-next.57, #10490) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und SvelteKit im Februar 2024

SvelteKit 2.1 bis 2.4 bringen tree-shakebaren Client-Router, $env/static/public in Service Workern, CSP-Unterstützung für style-src-elem, den neuen reroute-Hook und die read-Funktion in $app/server.

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.

In case you missed it, Rich also posted Tenets, “an attempt to articulate the Svelte philosophy — our bedrock principles, that guide our design decisions.”

So let’s dive in to check out what’s new and see what the rest of the community has been up to...

What’s new in SvelteKit

  • The client router is now tree shakeable (2.1.0, #11340)
  • $env/static/public is now exposed in service workers (2.2.0, Docs, #10994)
  • style-src-elem is now supported in environments with a Content Security Policy (2.2.1, Docs, #11562)
  • The new reroute hook allows you to change how URLs are translated into routes (2.3.0, Docs, #11537)
  • The read function is now available in the $app/server module - allowing you to read assets from the filesystem (2.4.0, Docs, #11649) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und SvelteKit im Januar 2024

SvelteKit 1.29 und 1.30 ersetzen resolvePath durch resolveRoute und inline response.arrayBuffer() während SSR; SvelteKit 2.0 fügt unter anderem untrack in load hinzu.

Happy New Year! It’s been a busy month for the Svelte maintainers - with tons of new features dropping in the Svelte 5 preview and the release of SvelteKit 2!

You can find all the new features in both projects below, along with a bunch of resources and sites built with Svelte in the Community Showcase.

Let’s jump in...

What’s new in SvelteKit (2.0 and more!)

With its 2.0 release, SvelteKit is now more capable than ever. Be sure to check out the docs links in each update for more info on how to use each feature as well as the new Performance page - which explains how SvelteKit works to make your applications as performant as possible.

  • resolvePath has been replaced by resolveRoute in $app/paths. Use it to populate a route ID with params to resolve a pathname (1.29.0, Docs, #11261)
  • response.arrayBuffer() will now be inlined during SSR (1.30.0, Docs, #10535)
  • SvelteKit 2.0.0 adds:
    • untrack to load to opt-out of invalidation (Docs, #11311) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

SvelteKit 2.0 mit Shallow Routing veröffentlicht

SvelteKit 2.0 unterstützt Vite 5 und führt Shallow Routing ein, das das Verknüpfen von Zustand mit einem Verlaufseintrag ohne Navigation ermöglicht.

Version 2.0 of SvelteKit, the official framework for building apps with Svelte, is now available. It is an incremental release that adds support for the newly-released Vite 5 along with a bevy of small improvements and one much-requested feature.

If you’ve been paying close attention to Svelte in recent months, you’ll know that we’ve been hard at work on Svelte 5, which is possibly the most anticipated release in the project’s history. Upgrading to SvelteKit 2 will smooth the path for Svelte 5 when it is released in 2024, and we encourage all users to upgrade when you get a chance.

We recommend updating to the most recent 1.x release first, along with Svelte 4, in order to address any deprecation warnings. Then, upgrade to SvelteKit 2 by running the automated migration tool:

npx svelte-migrate sveltekit-2

The migration guide has more details about what’s new.

Shallow routing

Way back in the mists of time — May, to be precise — we teased a new feature that allows you to associate state with a history entry without causing navigation. It’s very useful for creating modals that you can dismiss by swiping back, or pop-up views of routes you don’t want to do a full navigation to. …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte im Dezember 2023

Auf dem Svelte Summit Fall 2023 wurden Svelte DevTools, Bildoptimierung und eine Vorschau von Svelte 5.0 vorgestellt.

Svelte Summit Fall 2023 was epic! Featuring talks from across the ecosystem and the launches from the core team of new Svelte Dev Tools, image optimization, and a preview version of Svelte 5.0! The whole talk can be found here (timestamps below):

  • 0:00 Hype music!
  • 18:20 Exploring Svelte DevTools - Ignatius B (4 minutes)
  • 25:27 How does SvelteKit fare as a SPA Framework - Henry Lie (25 minutes)
  • 53:00 enhanced:img - Ben McCann (6 minutes)
  • 1:03:44 inlang-paraglide JS for SvelteKit i18n - Samuel Stroschein (10 minutes)
  • 1:17:32 How Svelte & GraphQL plays well together - Jean-Yves Couet (31 minutes)
  • 1:53:10 svelte-ecosystem-ci - Dominik G (10 minutes)
  • 2:23:06 Svelte for Creative Development - Steven Stavrakis (10 minutes)
  • 2:35:33 Translating the docs - Romain I’Ourson (11 minutes)
  • 2:49:48 ENHANCE! - Paolo Ricciuti (25 minutes) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und SvelteKit im November 2023

Svelte 4.2.2 behebt element-spezifische Probleme, die Sprachetools verbessern Block-Folding und Routenparameter-Typen werden in SvelteKit 1.26 aus Matcher-Guards abgeleitet.

Mark your calendars! Svelte Summit Fall is on November 11th. Join us on YouTube and in the Discord for hours of Svelte-focused fun 🎥

Every month, maintainers within the Svelte ecosystem fix bugs, improve performance and bring new features to Svelte, SvelteKit and the tooling around them. This month’s releases brings an improved developer experience with better block folding, inferred types and configuration for use:enhance.

Let’s take a closer look 👀...

What’s new in Svelte & Language Tools

  • Svelte 4.2.2 cleans up a few element-specific features (Release Notes)
  • Extensions 107.12.0 improves block folding for functions, if statements and more (Release Notes, PR)

What’s new in SvelteKit

  • Route parameter types will now be inferred from the applicable matcher’s guard check (kit@1.26.0, Docs, #10755) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und SvelteKit im Oktober 2023

Svelte 4.2.1 enthält Fixes für HTML-, CSS- und Sourcemap-Kompilierung, die Sprachwerkzeuge verbessern Komponentenreferenzen und die auto-types-Fallback-Behandlung.

Svelte 5 isn’t out yet (you can, however, preview it now), but that doesn’t mean we don’t get a sneak peek! Most notably are Runes - a simpler way to manage reactive variables in Svelte code. There’s lots of links the showcase section for deeper dives on all things Runes, but let’s talk about what else been released this month...

What’s new in Svelte & Language Tools

What’s new in SvelteKit …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

SvelteKit nimmt am Hacktoberfest 2023 teil

SvelteKit beteiligt sich am Hacktoberfest 2023; registrierte Entwickler können durch Pull-Requests zu SvelteKit am Event teilnehmen.

Sveltekit 🧡 Hacktoberfest

We’re excited to announce SvelteKit’s participation in this year’s Hacktoberfest! Hacktoberfest is a global event that takes place every October, during which developers are encouraged to contribute to open-source projects like SvelteKit. The goal is to foster a vibrant open-source community, celebrate shared knowledge, and make the world of coding more accessible to all. You can find other participating repositories by searching the hacktoberfest topic on github.

Getting Started

The first step is to register for Hacktoberfest. Once you’ve registered, any PRs submitted to Sveltekit will count towards your participation in the event!

Contributing

If you need inspiration when looking for an issue to fix, check out the low hanging fruit, contributions-welcome, ready to implement, or documentation tags. …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Einführung von Runes für Svelte 5

Svelte 5 führt runes ein, die universelle, feingranulare Reaktivität in JavaScript ermöglichen und für fast alle bestehende Komponenten kompatibel sind.

In 2019, Svelte 3 turned JavaScript into a reactive language. Svelte is a web UI framework that uses a compiler to turn declarative component code like this...

App

<script>
	let count = 0;

	function increment() {
		count += 1;
	}
</script>

<button on:click={increment}>
	clicks: {count}
</button>
<script lang="ts">
	let count = 0;

	function increment() {
		count += 1;
	}
</script>

<button on:click={increment}>
	clicks: {count}
</button>

...into tightly optimized JavaScript that updates the document when state like count changes. Because the compiler can ‘see’ where count is referenced, the generated code is highly efficient, and because we’re hijacking syntax like let and = instead of using cumbersome APIs, you can write less code.

A common piece of feedback we get is ‘I wish I could write all my JavaScript like this’. When you’re used to things inside components magically updating, going back to boring old procedural code feels like going from colour to black-and-white.

Svelte 5 changes all that with runes, which unlock universal, fine-grained reactivity.

Introducing runes

Before we begin

Even though we’re changing how things work under the hood, Svelte 5 should be a drop-in replacement for almost everyone. The new features are opt-in — your existing components will continue to work. …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und SvelteKit im September 2023

Svelte 4.2.0 verschiebt svelteHTML in den Kern, SvelteKit 1.23 akzeptiert URL in redirect und warnt bei falsch geschriebenen Routen, 1.24 führt onNavigate für View Transitions ein.

Happy September y’all! With all the sneak peeks at what’s coming soon in Svelte 5, we thought it’d be best to look back at the last month to see what’s shipped and what the community is building with Svelte.

Before we jump in, a warm welcome to the new Svelte Ambassadors: @cainux and @grischaerbe! Welcome to the crew ⛴️

What’s new in Svelte & Language Tools

  • svelteHTML has moved from language-tools into Svelte core so that svelte/element types will now load correctly (4.2.0 in Svelte, 107.10.0 in Language Tools)

What’s new in SvelteKit

  • URL is now accepted in the redirect function (1.23.0, Docs, #10570)
  • Mistyped route filenames will now throw a warning (1.23.0, #10558)
  • The new onNavigate lifecycle function enables view transitions - Check out the blog post for more info (1.24.0, Docs, #9605) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

View Transitions in SvelteKit 1.24 aktivieren

Der neue onNavigate-Hook in SvelteKit 1.24 erleichtert die Integration des View-Transitions-API in Navigationsabläufe.

The view transitions API has been sweeping the web development world lately, and for good reason. It streamlines the process of animating between two page states, which is especially useful for page transitions.

However, until now, you couldn’t easily use this API in a SvelteKit app, since it was difficult to slot into the right place in the navigation lifecycle. SvelteKit 1.24 brought a new onNavigate lifecycle hook to make view transitions integration much easier – let’s dive in.

How view transitions work

You can trigger a view transition by calling document.startViewTransition and passing a callback that updates the DOM somehow. For our purposes today, SvelteKit will update the DOM as the user navigates. Once the callback finishes, the browser will transition to the new page state — by default, it does a crossfade between the old and the new states.

documentvar document: Documentwindow.document returns a reference to the document contained in the window.
MDN Reference
.startViewTransition(method) Document.startViewTransition(callbackOptions?: ViewTransitionUpdateCallback | StartViewTransitionOptions): ViewTransitionThe startViewTransition() method of the Document interface starts a new same-document (SPA) view transition and returns a ViewTransition object to represent it.
MDN Reference
(async () => { …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und SvelteKit im August 2023

Svelte 4.1.0 erlaubt weitere Anpassungen am Custom-Element-Wrapper, SvelteKit 1.22.0 bietet die HEAD-Server-Methode und das Caching von Vary-Antworten.

Some sweet new features have dropped in both Svelte and SvelteKit, this month. It’s also great to see how many products and side projects have launched using Svelte as their core technology!

More on all that down below...

What’s new in Svelte & Language Tools

There’s been a bunch of minor bugfixes since the Svelte 4 release. You can find them in the CHANGELOG.

The 4.1.0 release added the ability to further customize the custom element class that wraps the underlying Svelte component. Check out the Custom Elements API docs or the PR for more info!

In addition to supporting SvelteKit’s new HEAD server method, Svelte’s language tools now support Prettier v3 (extensions-107.9.0) and workspace trust settings are now used to support all settings in workspace (extensions-107.8.0).

What’s new in SvelteKit

  • The HEAD server method is now available in API routes (1.22.0, Docs, #9753)
  • Responses with Vary headers are now cached, too (except for Vary: *) (1.22.0, Docs, #9993) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und SvelteKit im Juli 2023

Svelte 4.0 wurde veröffentlicht, SvelteKit 1.21.0 führt das neue event.isSubRequest-Boolean ein.

Svelte 4 is out and folks have been building! There’s a bunch of new showcases, libraries and tutorials to share. So let’s get right into it...

What’s new in Svelte

The big news this month was the release of Svelte 4.0! You can read all about it in the Announcing Svelte 4 post. From performance fixes and developer experience improvements to a brand new site, docs and tutorial... this new release sets the stage for Svelte 5 with minimal breaking changes.

If you’re already on Node.js 16, it’s possible you won’t see any breaking changes in your project. But be sure to read the migration guide for all the details.

For a full list of all the changes to the Svelte compiler, including unreleased changes, check out the CHANGELOG.

What’s new in SvelteKit

This month there were lots of awesome bug fixes, so be sure to upgrade to the latest version! There are also a few new features to mention:

  • The new event.isSubRequest boolean indicates whether this is a same-origin fetch request to one of the app’s own APIs during a server request (1.21.0, Docs, #10170) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neue Website mit mehrseitiger Doku

Die svelte.dev-Website wurde komplett überarbeitet: Die Doku ist in mehrere Seiten aufgeteilt, alle Module sind in der Seitenleiste aufgeführt, und alte Links werden automatisch umgeleitet; zusätzlich gibt es eine neue Suche.

When the initial version of Svelte v3 was released four years ago, it included the single-page documentation that folks have been familiar with. That documentation structure had stayed the same as Svelte’s API surface increased steadily and more details were added. As a result, the single page got larger and larger to the point where it was becoming difficult to find things. The community had been asking for a revamp, and now it’s here!

Meet the new svelte.dev — a complete overhaul of the old website.

Multi-page docs

The table of contents had grown to be quite large and you had to scroll across half a dozen screens to see the whole thing. We heard you! The docs are all split up into multiple pages now and all pages list their sections in the righthand sidebar.

All modules exposed by Svelte are also listed in the sidebar under the Runtime section:

  • svelte
  • svelte/store
  • svelte/motion
  • svelte/transition
  • svelte/animate
  • svelte/easing
  • svelte/action

svelte/compiler is under Compiler and API section

We’ve also taken extra care to ensure that all the links from the old website will be redirected to the correct new page.

Search …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Stable Release von Svelte 4 angekündigt

Svelte 4 ist als stabile Version erschienen und bietet kleinere und schnellere Hydration-Code sowie angehobene Mindestanforderungen.

After months in the making, we’re excited to announce the stable release of Svelte 4.

Time flies - Svelte 3 was released more than four years ago! In JavaScript-framework-time, that’s eons. Svelte’s freshness has persisted throughout, but Node.js and browser APIs have evolved during that time and today we’re updating Svelte to take advantage of some of these improvements. Svelte 4 is mainly a maintenance release, bumping minimum version requirements and tightening up the design in specific areas. It sets the stage for the next generation of Svelte to be released as Svelte 5 - we think you’ll love it.

If you haven’t tried Svelte yet, take it for a spin in our interactive tutorial, on StackBlitz, or locally with npm create svelte@latest. Svelte lets you easily put together web UIs leveraging the power of HTML, CSS, JS, and the Svelte compiler. Watch Svelte Radio Live to learn more about this release.

What’s new

Performance

This release results in smaller and faster hydration code. To see the impact, SvelteKit users can see their compiled output shrink in size by examining the .svelte-kit/output/client/_app/immutable/nodes folder. For example, on kit.svelte.dev the JS generated across the whole site was reduced in size by 12.7% (126.3 kB to 110.2 kB). …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und SvelteKit im Juni 2023

Svelte 4.0.0-next.0 und Svelte 3.59.0 wurden veröffentlicht, mit korrektem Handling von Spread-Operatoren bei Array-Umstrukturierung.

Welcome to June everyone and congrats to our SvelteHack winners, across all the categories! If you missed it, these winners were announced at Svelte Summit on May 6th 🎉

The entire playlist of the summit, including all the talks broken up in to separate videos, can be found on the Svelte Society YouTube channel. So check it out, if you haven’t already.

Lots to cover in this month’s newsletter, including a lot of improvements to both Svelte and Kit...

What’s new in Svelte

Svelte 4.0.0-next.0, the first pre-release version of Svelte 4.0 is out! An explanation of the changes, improvements and goals of this release can be found in the Releases page on GitHub. Check it out to get an early sneak peek of the future of Svelte. It also includes a migration guide, for those interested in the minimal amount of breaking changes and deprecations.

Svelte 3.59.0 is also out, with a ton of new features:

  • Restructuring arrays with the spread operator (...) is now handled correctly (3.59.0, #8552, #8554) …

Originalquelle(öffnet in neuem Tab)Problem melden