
A quick introduction into Vite.AspNetCore
If you want to build an MPA (Multi-Page Application) in ASP.NET Core with Vite then Vite.AspNetCore provides you with just the tools you need. The project is well-documented on its GitHub page and there are some very complete samples to base your project off of. While testing out my setup, I gained some insights into how the library works and I made this little retrospective to document them. Here's my project: AspNetVite First steps I started off by creating an ASP.NET Core MVC application. mkdir AspNetVite cd AspNetVite dotnet new mvc dotnet new gitignore Next, I added the NuGet package and updated my Program.cs by following the project's setup instructions . Then I copied some config files from one of the sample projects to my own project. These were: package.json , tsconfig.json , tsconfig.node.json , and (probably the most important one) vite.config.ts . I customized package.json ( name , author , version , ...) and ran my first npm i . You can see all changes I made in my commit
Continue reading on Dev.to
Opens in a new tab



