A step-by-step guide to integrating Vite's development server with ASP.NET Core using the Vite.AspNetCore NuGet package. Covers project structure setup, configuring vite.config.ts to use ASP.NET Core's HTTPS certificate, appsettings configuration, middleware registration in Program.cs, and connecting the Razor layout to Vite's HMR dev server. Also notes caveats around initial page load timing, Sass HMR imports, and excluding wwwroot from source control.

6m read timeFrom khalidabuhakmeh.com
Post cover image
Table of contents
What’s Vite?Adding Vite To ASP.NET CoreCaveatsConclusion
5 Impressions