Microsoft.AspNetCore.SpaServices.Extended 的文档在哪里?

这个 微软官方网页Microsoft.AspNetCore.SpaServicesMicrosoft.AspNetCore.NodeServices已经过时了,在 Microsoft.AspNetCore.SpaServices.Extensions中“可以使用更简单的 SPA 框架集成机制”。

我找不到任何关于 Microsoft.AspNetCore.SpaServices.Extensions的文件。似乎没有相应的名称空间,所以我甚至不能使用 IntelliSense 找到任何东西。

GitHub 上的淘汰声明同样模糊不清。

具体来说,我试图找出如何升级到 app.UseWebpackDevMiddleware呼叫。

Microsoft.AspNetCore.SpaServices.Extensions的正式文件在哪里?

5668 次浏览

Here are some of the docs that may help, however they are not very detailed:
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.spaservices?view=aspnetcore-6.0
https://learn.microsoft.com/en-us/aspnet/core/client-side/spa-services?view=aspnetcore-6.0

Microsoft.AspNetCore.SpaServices Namespace Provides types for hosting a Single Page Application (SPA).

SpaOptions Describes options for hosting a Single Page Application (SPA).

ISpaBuilder Defines a class that provides mechanisms for configuring the hosting of a Single Page Application (SPA) and attaching middleware.

Seeing as you're asking specifically about upgrading the call to app.UseWebpackDevMiddleware(), I found that this NuGet package does exactly that!