最佳答案
ASP.NET Core 2.1.1 offers several seemingly related extension methods for appBuilder:
UseStaticFiles
from Microsoft.AspNetCore.StaticFiles
UseSpaStaticFiles
from Microsoft.AspNetCore.SpaServices.Extensions
UseSpa
from Microsoft.AspNetCore.SpaServices.Extensions
Please help me make sense of their purpose and relation to each other?
Also, is there any difference from the server execution standpoint if I run these methods in a different order
e.g.
app.UseStaticFiles() -> app.UseSpaStaticFiles() -> app.UseSpa()
vs
app.UseSpa() -> app.UseSpaStaticFiles() -> app.UseStaticFiles()