Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.06 KB

README.md

File metadata and controls

36 lines (24 loc) · 1.06 KB

SpaServices.ViteJsDevServer

CI Build

Brings plug'n'play support for Vite.js to ASP.NET Core. Vite.js is an opinionated build tool that enables lightning-fast development by relying on non-bundled JavaScript modules.

Caveats:

The HMR WebSocket setup is not relative to the web root in Vite.js. This means it cannot reliably work with the ASP.NET Core development reverse proxy.

That’s why a NuGet package will not be properly published for now.

Usage:

app.UseSpa(
    spa =>
    {
        spa.Options.SourcePath = "ClientApp";

        if (env.IsDevelopment())
        {
            spa.UseViteJsDevServer(npmScript: "dev");
        }
    });

Copyright

Includes code taken directly from Microsoft.AspNetCore.SpaServices.Extensions. This includes all source files included from the aspnetcore submodule.

License

Available under Apache License 2.0