I want to add an angular application to a MVC application in .Net Core 3.1. So I can add authorization attributes to the Controller and use
<base href="~/" />
in the Index.cshtml for apps in virtual directories. But how do u know which necessary webpack output script tags to add to the Index.cshtml? Or is there even a way to do it automatically?
if I add the UseSpa stuff to the StartUp.cs I can see in the build output that webpack starts and builds the angular application up to 93% but then it all ends in a timeout. I probably have to configure the agular.json file not to add stuff to an index.html ? (I copied all the angular stuff from a ASP.Net Core 3.1 application using the Angular SPA template)
app.UseSpa(spa =>
{
// To learn more about options for serving an Angular SPA from ASP.NET Core,
// see https://go.microsoft.com/fwlink/?linkid=864501
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "start");
}
});