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

SvelteKit-Verbesserungen im Januar 2022

SvelteKit erhält Brotli-Kompression, paralleles Vorrendern, automatische CSS-Einbindung, deaktivierbare Service-Worker-Registrierung, SSR-Routenaufteilung und vereinfachte Anfrage-URLs.

Happy new year, Svelte Community! Lots to share this month across Svelte, SvelteKit, Language Tools and the Showcase. Thanks to everyone who made 2021 a great year to use Svelte. Looking forward to the next one 🚀

What’s new in SvelteKit

  • @sveltejs/adapter-static for SvelteKit now has a precompress option to make brotli compression of assets and pages easier to do out of the box (#3079)
  • Concurrency mode in SvelteKit will now prerender pages in parallel (#3120). It is enabled by default in 1.0.0-next.205 and later
  • CSS is now automatically included before JS for improved page performance (d13efe)
  • A new config option adds the ability to disable service worker registration to do your own custom registration (#2988)
  • SSR route-splitting is here - breaking monolithic builds into smaller pieces for improved startup and routing performance (#2931)
  • request.origin/path/query is now request.url - simplifying the config and page load functions (#3126) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Highlights vom Svelte Summit Fall 2021

Rich Harris kündigte seinen Wechsel zu Vercel an, um Svelte in Vollzeit zu pflegen, und Steph Dietz sprach über die einfache Lernbarkeit von Svelte.

With SvelteKit getting more and more stable each day, there’s not much to cover in terms of code changes other than bug fixes... So, in this month’s newsletter, we’ll be covering Svelte Summit Fall 2021!

If you want to dive deep into the last month’s worth of bug fixes, check out the Svelte and SvelteKit changelogs, respectively.

What happened at Svelte Summit?

If you missed Svelte Summit, you can watch the entire live stream on YouTube and catch a recap in the #svelte-summit channel on Discord.

Here are the highlights:

  • Rich Harris took us through a tour of Svelte’s history and announced his move to Vercel - where he will be helping maintain Svelte full-time! (20:00)
  • Steph Dietz explained how Svelte’s simple abstractions makes it easy for beginners and experts alike to learn and use JavaScript - without the boilerplate (29:00) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte und SvelteKit Neuerungen im November 2021

Svelte erreicht 80% des SvelteKit-Meilensteins, fügt die Compiler-Option enableSourcemap hinzu und die Language Tools lesen nun VS-Code-CSS-Einstellungen.

With SvelteKit crossing the 80% complete mark, over 5000 stars on GitHub, and now having more usage than Sapper, there’s never been a better time to try it out! Many in the community have, making for quite a large showcase this month...

Also, don’t miss out on Svelte Summit on November 20th - featuring speakers from around the world. Keep an eye out for a watch party in your area 👀

Now onto what’s new!

New in Svelte and SvelteKit

  • svelte.dev now runs on SvelteKit alongside sveltesociety.dev. svelte.dev is a relatively complicated site with live code editing, authentication, and a markdown-based blog - making it a great way for us to really test out SvelteKit
  • A new compiler option, enableSourcemap, provides more control over the compiler output for JS and CSS sourcemaps (3.44.0). With this new feature, SvelteKit and the Vite Svelte plugin can now properly handle environment variables in .svelte templates (See sveltejs/kit#720 and sveltejs/vite-plugin-svelte#201)
  • The Svelte Language Tools now support reading the configuration of the VS Code CSS settings (#1219) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte und SvelteKit Updates im Oktober 2021

Svelte 3.43.0 und 3.42.4 bringen SSR-Lifecycle-Funktionen und beheben Build-Probleme mit src-Attributen, während die Extensions 105.4.0 TypeScript-Plugin-Empfehlungen und Ereignismodifier-Autovervollständigung hinzufügen.

Hey y’all 👋 It’s been 1 year since “What’s new in Svelte” started being cross-posted to the Svelte blog. I wanted to take this moment at the top to thank all of you for reading and for all the contributors every month. From the maintainers to everyone who posts their work in the Discord and Reddit, it’s amazing to witness all the effort that goes into making the Svelte community great.

Keep up the good work, everyone! Now, let’s dive into this month’s news...

New around Svelte

  • New additions to Svelte’s export map now expose no-op versions of lifecycle functions for SSR (Svelte 3.43.0)
  • Custom components with a src attribute no longer break svelte-native builds (Svelte 3.42.4)
  • Svelte plugin users without the TypeScript plugin enabled will now be prompted to enable it. It enhances TypeScript and JavaScript files with additional intellisense to interact with Svelte files. Please leave feedback if you are using it (Svelte extensions 105.4.0)
  • Event modifiers have been added to intellisense as autocomplete and hover info (Svelte extensions 105.4.0) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte und SvelteKit Neuerungen im September 2021

Svelte 3.42.x erlaubt use:actions auf <svelte:body>, kennt neue Globals, reduziert Codeausgabe und verbessert flip-Animationen, während SvelteKit weitere Fortschritte macht.

This month, Svelte was voted StackOverflow’s most loved web framework, Tan Li Hau talked to Svelte Radio about his Svelte-filled YouTube channel, and SvelteKit made even more progress towards its 1.0 release!

New in Svelte

  • use:actions can now be used on <svelte:body> (3.42.0)
  • HTMLElement, SVGElement (3.42.2) and BigInt (3.42.3) are now known globals
  • There is less code in Svelte’s output thanks to the following improvements in 3.42.2:
    • Whitespace is now collapsed in class and style attributes
    • Hydrated components have been updated to only rely upon helpers for creating the types of elements present in the component
  • Scaling is now accounted for in flip animations (3.42.2)
  • All <option>s in a <select> are now deselected when the bound value doesn’t match any of them (3.42.2)

For a full list of features and bug fixes, check out the Svelte changelog.

SvelteKit Updates …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im August 2021

Svelte 3.39.0 bis 3.41.0 bringen den |trusted-Event-Modifier, das Paket svelte/ssr, die Compiler-Option errorMode und die Möglichkeit, Komponenten im Shadow DOM zu rendern.

From The Changelog (JS Party Ep. 182) to Svelte Radio (Episodes 29 and 30), it seems that folks couldn’t help but talk about Svelte, this month! Also, shadow DOM support and new export and await functionality are new in Svelte.

New in Svelte

July was the most active month for the Svelte core repo since late 2019 as we really worked to reduce the number of outstanding PRs and saw the release of Svelte 3.39.0, 3.40.0, and 3.41.0. Tons of bug fixes were added as well as the following new features:

  • The |trusted event modifier allows you to check if an event is trusted before it’s called (#6137)
  • The new svelte/ssr package to support work on improving SvelteKit SSR (#6416)
  • A new errorMode compiler option to support improved preprocessing of TypeScript files (#6194)
  • You can now specify a ShadowRoot as the target when creating a component - making it possible to render Svelte components inside the shadow DOM (#5869) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im Juli 2021

SvelteKit erhält vorkomprimierte Assets in adapter-node, TypeScript-Transpilierung und verbesserte Cache-Standards; Svelte 3.38.3 bringt Leistungs- und Fehlerbehebungen.

As the northern hemisphere heats up, Svelte has stayed cool with lots of performance and bug fixes, better TypeScript support, and lots of new components & tools from around the ecosystem. Let’s take a peek 👀

New in SvelteKit

  • adapter-node now precompresses assets using gzip & brotli (#1693)
  • Support for TypeScript transpilation has been added to the svelte-kit package tooling (#1633)
  • Improved caching defaults in adapter-node (#1416)
  • Allow configuring Rollup output options (#1572)
  • Fixed usage of SSL with HMR (#1517)

Features & bug fixes from around svelte/*

  • Svelte 3.38.3 (released June 22) includes a bunch of performance and bug fixes - including hydration optimizations, this preservation in bubbled events, and more!
  • The latest language tools releases added support for prop renaming from outside of a component, PostCSS syntax grammar, and a .d.ts output target in svelte2tsx which can be used to create type definitions from Svelte files. …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im Juni 2021

SvelteKit nutzt jetzt ESM-Konfigurationsdateien, bindet Vite ein, benennt Ordner und Variablen um und bietet die Option trailingSlash; svelte-check ist im TypeScript-Template enthalten.

This month, we saw lots of contributions to SvelteKit and its docs. The language tools also got some new features, most notably deeper integration with Svelte files within JavaScript or TypeScript files. Let’s jump into the updates...

New in SvelteKit

  • svelte.config.js config files are now loaded in ESM format (.js instead of .cjs).
  • AMP pages will now use the rendered CSS, rather than emitted CSS
  • svelte-check has been added to the TypeScript template (sveltejs/kit#1556)
  • Support for https keypair sveltejs/kit#1456
  • Now bundling Vite with SvelteKit and using an upgraded version. Remove Vite from your package.json if it’s there
  • Etags for binary responses sveltejs/kit#1382
  • Renamed $layout to __layout and $error to __error
  • Removed getContext in favor of request.locals
  • Renamed .svelte output directory to .svelte-kit. Update your .gitignore accordingly
  • trailingSlash: 'never' | 'always' | 'ignore' is now available in the config. This should make it easier to build sites that work with static hosting providers that expect a trailing slash for index.html pages, and provides an escape hatch for anyone that needs more complex behaviour.

Notable bug fixes in SvelteKit …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im Mai 2021

Der Svelte-Compiler unterstützt :global() in zusammengesetzten Selektoren und CSS-Custom-Properties; SvelteKit bietet SPA-Erstellung, deaktivierbares SSR und bessere Fehlermeldungen.

Last week, Svelte Summit blew us away with a mountain of content! Check out the full recording or an audio-only (p)review on Svelte Radio. Now let’s get into this month’s news...

New features in the Svelte Compiler

  • :global() is now supported as part of compound CSS selectors (3.38.0, Example)
  • CSS custom properties can now be passed to components for use cases such as theming (3.38.0, Docs coming soon)

New in SvelteKit

  • kit.svelte.dev has a fresh new look and the SvelteKit Demo Site got a fresh set of paint. Check it out by running npm init svelte@next
  • You can now use @sveltejs/adapter-static to create a single-page app or SPA by specifying a fallback page (PR, Docs)
  • Disable Server-side Rendering (SSR) app-wide or on a page-by-page basis (PR)
  • Error messages thrown during pre-rendering are now much more informative and readable (PR, Docs) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im April 2021

SvelteKit ist jetzt in der öffentlichen Beta; Svelte 3.35.0 führt Slotted Components ein und die Language Tools unterstützen verknüpftes Bearbeiten von HTML.

Two projects that have been months (even years) in the making have made their way out into the world. SvelteKit is now in public beta and slotted components are now available in Svelte!

What’s up with SvelteKit?

SvelteKit - Svelte’s versatile framework for building SSR, serverless applications, or SPAs - is now officially in public beta. Expect bugs! Lots more detail in the latest blog post. Want to know when 1.0 is close? Check out the milestone on github.

Want to learn more about how to get started, what’s different compared to Sapper, new features and migration paths? Check out this week’s episode of Svelte Radio for a deep dive with Antony, Kev and Swyx.

New in Svelte & Language Tools

  • Slotted components, including <svelte:fragment slot="..."> lets component consumers target specific slots with rich content (Svelte 3.35.0, Language Tools 104.5.0)
  • Linked editing now works for HTML in Svelte files (Language Tools, 104.6.0) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

SvelteKit in öffentlicher Beta

Previously: What's the deal with SvelteKit?

It’s time. After five months and hundreds of commits, you’re finally invited to try out the SvelteKit beta. It’s not finished — there are a few known bugs and several missing features — but we’re really happy with how it’s shaping up and can’t wait for you to try it.

Starting a new project is easy:

# create the project
mkdir my-app
cd my-app
npm init svelte@next

# install dependencies
npm install

# start dev server and open a browser tab
npm run dev -- --open

You’ll find documentation at svelte.dev/docs/kit. If you have a Sapper app that you’d like to migrate to SvelteKit, you’ll find instructions on GitHub.

The source code is available at github.com/sveltejs/kit. Issues and pull requests are disabled while we finish getting our house in order, but we’ll be making it fully open in the near future.

Wait, what is SvelteKit?

Think of it as Next for Svelte. It’s a framework for building apps with Svelte, complete with server-side rendering, routing, code-splitting for JS and CSS, adapters for different serverless platforms and so on.

If you’re familiar with Sapper, SvelteKit is Sapper’s successor. …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im März 2021

Svelte 3.31.2 bis 3.33.0 verbessern die SSR-Store-Behandlung, erlauben mehrere Aktionsinstanzen pro Element, führen den foreign-Namespace ein und unterstützen Inline-Sourcemaps.

Lots to cover this month with releases from across the Svelte ecosystem. Most importantly, Svelte Summit Spring 2021 has an Open Call for Speakers. The deadline is March 14 so if you have an idea for a talk, submit it now!

Let’s dive into the news 🐬

What’s new in sveltejs/svelte

  • SSR store handling has been reworked to subscribe and unsubscribe as in DOM mode. SSR stores should work much more consistently now (3.31.2, see custom stores and Server-side component API )
  • Multiple instances of the same action are now allowed on an element (3.32.0, example)
  • The new foreign namespace should make it easier for alternative compile targets (like Svelte Native and SvelteGUI) by disabling certain HTML5-specific behaviour and checks (3.32.0, more info)
  • Support for inline comment sourcemaps in code from preprocessors (3.32.0)
  • Destructured defaults are now allowed to refer to other variables (3.33.0, example) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im Februar 2021

Der Compiler erkennt Aria-Rollen aus dem WAI-ARIA Graphics Module und warnt bei React-Attributen; die Language Tools verbessern Umbenennungen und semantische Hervorhebung.

With the shortest month of the year coming up, Svelte maintainers and community members alike have been busy this last month – from big changes in svelte-loader, prettier-plugin-svelte, rollup-plugin-svelte, and language-tools to steady progress in Sapper and svelte-preprocess. Meanwhile, lots of folks have been busy integrating Svelte with other popular frameworks.

New compiler features

  • Aria roles from the WAI-ARIA Graphics Module are now recognized as valid aria roles in Svelte components (3.31.1)
  • Compiler warnings for the common React attributes, className and htmlFor, now make it easier to port React components to Svelte (3.31.1)

Have a suggestion for a compiler feature or want to help implement new features/bug fixes? Check out the “triage: good first issue” tag for Svelte

New bits in language-tools

  • User disabled auto import suggestions no longer show in VS Code (103.0.0)
  • Renaming a variable is now safer with smart additions of a prefix/suffix to renamed variables (104.0.0)
  • Semantic (token) highlighting for TypeScript users lets theme makers apply semantic styling in their themes, if they support it (104.0.0) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im Januar 2021

Die Klasse SvelteComponent wurde zu SvelteComponentTyped umbenannt; Sapper 0.29.0 bringt neue TypeScript-Definitionen und Router-Verbesserungen.

Happy new year from Svelte! In the last month we made progress on Sapper’s upcoming release, fine-tuned our SvelteComponent typings, and have seen some amazing apps, sites, and libraries coming out in the showcase.

What’s changed in Svelte?

A new minor release replaces the SvelteComponent class with a SvelteComponentTyped class. This renaming should help with backwards compatibility. We’ve updated last month’s blog post to avoid any confusion with the name change.

If you’re using SvelteComponent or the new SvelteComponentTyped in your project or library, let us know what you’re using it for and we’ll add it to the showcase!

What’s going on in Sapper?

More quality of life features are landing in the upcoming release every day. 0.29.0 will include new TypeScript definitions, fixes to scroll tracking and prefetching behavior, and improvements to the runtime router to support encoded query parameters.

If you’re upgrading from 0.28.x, check out the migration guide for steps on updating to Sapper 0.29.

Is SvelteKit ready yet?

To avoid too much churn during development, SvelteKit is still being worked on in a private repo. There will be an announcement on the Discord, blog and Twitter when it’s ready for a larger group of users and contributors. …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte: Neuerungen im Dezember 2020

Svelte 3.29.5 bis 3.31.0 unterstützen $$props in Web Components, Spread-Props in Slots, die Funktion hasContext und die Klasse SvelteComponentTyped; Transitionen in {:else}-Blöcken funktionieren nun.

It’s the last “What’s new in Svelte” of the year and there’s lots to celebrate! This month’s coverage includes updates from rollup-plugin-svelte, Sapper and SvelteKit and a bunch of showcases from the Svelte community!

New features & impactful bug fixes

  1. $$props, $$restProps, and $$slots are all now supported in custom web components (3.29.5, Example) and slot components now support spread props: <slot {...foo} /> (3.30.0)
  2. A new hasContext lifecycle function makes it easy to check whether a key has been set in the context of a parent component (3.30.0 & 3.30.1, Docs)
  3. There is now a new SvelteComponentTyped class which makes it easier to add strongly typed components that extend base Svelte components. Component library and framework authors rejoice! An example: export class YourComponent extends SvelteComponentTyped<{aProp: boolean}, {click: MouseEvent}, {default: {aSlot: string}}> {} (3.31.0, RFC)
  4. Transitions within {:else} blocks should now complete successfully (3.29.5, Example) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

SvelteKit als Nachfolger von Sapper

Sapper wird nicht Version 1.0 erreichen, stattdessen wird der Nachfolger SvelteKit als Neuschreibung mit neuem Namen eingeführt.

If you didn't attend Svelte Summit, you can catch up on the Svelte Society YouTube page

If you attended Svelte Summit last month you may have seen my talk, Futuristic Web Development, in which I finally tackled one of the most frequently asked questions about Svelte: when will Sapper reach version 1.0?

The answer: never.

This was slightly tongue-in-cheek — as the talk explains, it’s really more of a rewrite of Sapper coupled with a rebrand — but it raised a lot of new questions from the community, and it’s time we offered a bit more clarity on what you can expect from Sapper’s successor, SvelteKit.

'Futuristic Web Development' from Svelte Summit

What’s Sapper?

Sapper is an app framework (or ‘metaframework’) built on top of Svelte (which is a component framework). Its job is to make it easy to build Svelte apps with all the modern best practices like server-side rendering (SSR) and code-splitting, and to provide a project structure that makes development productive and fun. It uses filesystem-based routing (as popularised by Next and adopted by many other frameworks, albeit with some enhancements) — your project’s file structure mirrors the structure of the app itself. …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Neuerungen in Svelte und Sapper

Svelte 3.29.3 bietet Verbesserungen bei destructuring Promises und Slot-Forwarding, Sapper 0.28.10 neue Typen für preload und diverse Fehlerbehebungen.

Welcome back to the “What’s new in Svelte” series! This month, we’re covering new features & bug fixes, last month’s Svelte Summit and some stand-out sites and libraries...

New features & impactful bug fixes

  1. Destructuring Promises now works as expected by using the {#await} syntax (3.29.3, Example)
  2. Slot forwarding (released in 3.29.0) should no longer hang during compilation (3.29.3, Example)
  3. Better typings for the get function in svelte/store and on lifecycle hooks (3.29.1)

What’s going on in Sapper?

Sapper got some new types in its preload function, which will make typing easier if you are using TypeScript. See the Sapper docs on how to use them. There also were fixes to preload links in exported sites. Route layouts got a few fixes too - including ensuring CSS is applied to nested route layouts. You can also better organize your files now that extensions with multiple dots are supported. (0.28.10)

For all the features and bugfixes see the CHANGELOGs for Svelte and Sapper. …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Svelte Oktober-Update mit neuen Features

Svelte 3.26.0 bis 3.29.0 führt unter anderem use:obj.method, numerische Trennzeichen, import.meta in Templates, CSS-Kombinatoren und den {#key}-Block ein.

Welcome to the first edition of our “What’s new in Svelte” series! We’ll try to make this a monthly blog post in which you’ll find out about new features, bug fixes, and a showcase of Svelte projects from around the community.

New features

  1. use:obj.method allows functions defined within objects to be used within actions (Example, 3.26.0, warning removed in 3.27.0)
  2. _ is now supported as a “numerical separator”, similar to a . or , (Example, 3.26.0)
  3. import.meta now works in template expressions (Example, 3.26.0)
  4. CSS Selectors with ~ and + combinators are now supported (Example, 3.27.0, with a compiler fix in 3.29.0)
  5. The {#key} block is now available to key arbitrary content on an expression. Whenever the expression changes, the contents inside the {#key} block will be destroyed and recreated. For an in-depth explanation and to find out how it’s implemented, check out the new blog post of Svelte Team member Tan Li Hau. (More info, 3.29.0) …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Offizielle TypeScript-Unterstützung für Svelte

Svelte unterstützt nun offiziell TypeScript, neue Projekte lassen sich per CLI erstellen und VS Code-Nutzer erhalten eine offizielle Erweiterung.

It’s been by far the most requested feature for a while, and it’s finally here: Svelte officially supports TypeScript.

We think it’ll give you a much nicer development experience — one that also scales beautifully to larger Svelte code bases — regardless of whether you use TypeScript or JavaScript.

Screenshot of TypeScript in Svelte

Image of TypeScript + Svelte in VS Code (theme is Kary Pro.)

Try it now

You can start a new Svelte TypeScript project using Svelte’s official scaffolding CLI by running npm create svelte@latest and following the prompts. This sets up a new SvelteKit project for you.

Alternatively you can run npm create vite@latest myapp -- --template svelte-ts to scaffold a Vite project using Svelte and TypeScript.

If you’re a VS Code user, make sure you’re using the (new) official extension, which replaces the popular extension by James Birtles. Later in this blog post, we’ll detail the individual steps involved in using TypeScript in an existing Svelte project.

What does it mean to support TypeScript in Svelte? …

Originalquelle(öffnet in neuem Tab)Problem melden

Svelte

Stabile Veröffentlichung von Svelte 3

Svelte 3 ist stabil und wandelt Komponenten zur Build-Zeit in effizienten imperativen Code um, um die DOM-Updates zu optimieren.

After several months of being just days away, we are over the moon to announce the stable release of Svelte 3. This is a huge release representing hundreds of hours of work by many people in the Svelte community, including invaluable feedback from beta testers who have helped shape the design every step of the way.

We think you’re going to love it.

What is Svelte?

Svelte is a component framework — like React or Vue — but with an important difference. Traditional frameworks allow you to write declarative state-driven code, but there’s a penalty: the browser must do extra work to convert those declarative structures into DOM operations, using techniques like virtual DOM diffing that eat into your frame budget and tax the garbage collector.

Instead, Svelte runs at build time, converting your components into highly efficient imperative code that surgically updates the DOM. As a result, you’re able to write ambitious applications with excellent performance characteristics.

The first version of Svelte was all about testing a hypothesis — that a purpose-built compiler could generate rock-solid code that delivered a great user experience. The second was a small upgrade that tidied things up a bit. …

Originalquelle(öffnet in neuem Tab)Problem melden