Dotnet Core vue w subkwatory
public void ConfigureServices(IServiceCollection services) {
...
services.AddSpaStaticFiles(configuration => { configuration.RootPath = "wwwroot"; });
...
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env) {
...
app.Map(
"/<<SUBFOLDER>>",
builder =>
{
builder.UseSpa(spa =>
{
if (env.IsDevelopment())
{
spa.Options.SourcePath = "<<PATH-TO-ANGULAR>>";
spa.UseAngularCliServer(npmScript: "start-dotnet");
}
else
{
spa.Options.SourcePath = "wwwroot/<<SUBFOLDER>>";
spa.Options.DefaultPageStaticFileOptions = new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot/<<SUBFOLDER>>"))
};
}
});
}
);
...
}
Tough Tiger