Toolbelt.AspNetCore.CssLiveReloader

CSS only live reloader library for ASP.NET Core (includes Blazor).


Keywords
blazor, live-reload, asp-net-core, aspnetcore
License
MPL-2.0
Install
Install-Package Toolbelt.AspNetCore.CssLiveReloader -Version 1.1.4

Documentation

ASP.NET Core CSS Live Reloader NuGet Package

Summary

This is a yet another CSS live reloader for ASP.NET Core App as an ASP.NET Core middleware.

fig.1

There are already many live reloading solutions.
However, instead of this middleware works for only CSS files, it reload styles more smoothly rather than other solutions.

How to use

  1. Add Toolbelt.AspNetCore.CssLiveReloader NuGet package reference to your ASP.NET Core Web App project.
dotnet add package Toolbelt.AspNetCore.CssLiveReloader
  1. After installing this package, what you have to do is just add one line app.UseCssLiveReload(); in your startup code, like this:
...
using Toolbelt.Extensions.DependencyInjection; // <- Add this, and...
...
public class Startup
{
  ...
  public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
  {
    ...
    if (env.IsDevelopment())
    {
      ...
      app.UseCssLiveReload(); // 👈 Add this!

That's all!

Release Notes

Release Notes

License

Mozilla Public License Version 2.0