In this tutorial we will take a look at how to integrate Svelte with optional TypeScript support in a Rails 7 project, with help of the Vite JS bundler.This tutorial is for a fresh created Rails 7 project, or an existing Rails app with vite-rails already installed.If you need to use Svelte in an existing Rails 7 default esbuild project, read this Reddit post on how to use Svelte components through a Stimulus controller.