Skip to main content

What’s new in Svelte: 2023年1月

SvelteKit 1.0、learn.svelte.dev、そして Svelte elements の型定義

SvelteKit 1.0 のリリースからちょうど2週間が経ちました! もしまだなら、livestream新しい web サイト をチェックし、SvelteKit の全機能を段階的に学ぶなら tutorial をチェックしてみてください。

それでは詳細を見ていきましょう…

What’s new in SvelteKit

  • @sveltejs/kit 1.0 is out! All future releases will follow semver and changes will be listed as major/minor/patch in the CHANGELOG.
  • Improved support for Storybook and Histoire (#7990). Work is ongoing to fully support those tools (storybook#20239).
  • vitePreprocess is now the default preprocessor. Please see the docs for differences between vitePreprocess and svelte-preprocess (#8036).

Breaking changes:

  • Unknown exports (except when starting with an underscore) are no longer allowed from +(layout|page)(.server)?.js and +server.js files (#7878)
  • __data.json is now stripped from URL (#7979)
  • sveltekit() will now return a promise for an array of Vite plugins (#7994)
  • A new embedded option, turned off by default, helps with link clicks when embedding SvelteKit (docs, #7969)
  • Automatic fallback generation has been replaced with builder.generateFallback(fallback) (#8013)
  • invalid() is now fail() and ValidationError is now ActionFailure (#8012)
  • SvelteKit will now throw an error on invalid load response (#8003)
  • SvelteKit is now using Vite 4 and requires a Svelte peerDependency of ^3.54.0 (#7543)
  • Shells are now prerendered when ssr is false and prerender is not false - ensure prerender is false when ssr is also false (#8131)
  • Warnings and errors about removed/changed APIs have been removed (#8019)

What’s new in Svelte

  • options.direction 引数を、カスタムのトランジション関数に渡せるようになりました (3.54.0, #3918)
  • @const で宣言した関数から、変数を更新できるようになりました (3.54.0, #7843)
  • svelte/elements に、Svelte/HTML の型定義が追加されました (3.55.0, #7649)

What’s new in Language Tools

Svelte extension と language tools が要求するミニマムバージョンが新しくなりました:

  • Node のバージョン は 16 になりました
  • TypeScript のバージョンは 4.9 になりました
  • Svelte のバージョンは 3.55 になりました

以下の機能がリリースされました:

  • missing handler quick fix (#1731)
  • add Svelte anchor missing attribute code action (#1730)
  • better commit characters handling (#1742)
  • add --preserveWatchOutput option (#1715)
  • enhance Quickfixes to include Svelte Stores (#1789)
  • only show SvelteKit files context menu in SvelteKit projects (#1771)
  • use the satisfies operator if possible (#1770)

Svelte コンパイラに対する全ての変更については、まだ未リリースの変更も含め、CHANGELOG をご確認ください。


Community Showcase

Apps & Sites built with Svelte

  • Svelte Recipes 🧑‍🍳 provides code snippets for common data visualization problems
  • Everything Svelte is a new course teaching everything you need to know to build a modern web application
  • CSS Timeline is a Timeline of the history and evolution of CSS
  • GitBar is a system tray app for showing your pull requested reviews
  • Texture Lab generates instant textures for games from any text
  • Totems is a studio creating custom-made stands and supports
  • PeopletoNotion is a Chrome Extension that adds LinkedIn profiles to Notion in one click
  • DeckDev is a deck builder for Magic: The Gathering
  • Default Shortcuts is a tool for searching keyboard shortcuts across browsers.

Learning Resources

From Svelte Society

To Watch

To Read

Libraries, Tools & Components

ハッピーニューイヤー 🎆 見落としなどございましたら RedditDiscord にてお知らせください。