Spark is primarily a backend framework that provides out of the box features to build modern web applications. However, we still want to offer a full-stack experience.
All Spark projects come with Tailwind CSS setup for you. Your free to remove it and use your own custom CSS or another library if you’d like.
Spark uses Vite to bundle your CSS and JS for you. It provides fast build times and Hot Module Replacement during local development.
You will find a
vite.config.js file that configures and loads Vite for you.
Spark also uses the Vite.AspNetCore Nuget package. This auto starts a Vite server for you when developing locally so you don’t have to start it manually.
Finally, Spark projects are also setup to build your assets for you whenever running a
dotnet build or
dotnet publish. You can find thses build commands in your
Spark projects come with Tailwind CSS installed via NPM by default.
If you need to customize Tailwind CSS, you can do so in the
If you need to add custom CSS classes outside of the Tailwind library, you can do so by updating the
Assets/Css/app.css file. This file is picked up by Vite, which prunes any unused Tailwind classes and bundles a minified CSS file for you.
Spark project come with AlpineJS by default.
You can learn more about Alpine here.
Assets/Js/app.js file. This file is picked up by Vite, which then builds the minified Js file for you.