/AspNetCore_Vite_Template

A Startup Template for ASP.Net Core and Vite project

Primary LanguageC#MIT LicenseMIT

AspNetCore_Vite_Template

A Startup Template for ASP.Net Core and Vite project

Feature

  1. Integrating Asp.Net Core and Vite.
  2. Support frontend app HMR
  3. Support HTTPS
  4. Auto build and publish frontend app when publishing backend app
  5. 9 templates -- both Vue and React (JS and TS)
Vue + TypeScript Vue React + TypeScript React
Asp.Net Core MVC 5 O X X X
Net 6 Use Controllers O O O O
Net 6 + Minimal API O O O O

How to use it

VS marketplace : https://marketplace.visualstudio.com/items?itemName=MakotoAtsu.AspNetCoreViteStarter


  1. Install this extension in your VS2019 or VS2022 (download from web page or use VS extension manager)

  1. Create a new project and choose 1 template

image

  1. Press F5 to run both backend and frontend server

image


image


  1. Hit button to fetch data from the backend

image


6. Frontend app will auto-build when you publish the backend app

image


image


If you want to use other Vite template

Just create a new Vite template and replace all content in the ClientApp folder