Revert "vite++"

This reverts commit fcaa4f884c.
This commit is contained in:
2020-10-15 14:10:13 +02:00
parent bef5593b09
commit 3fc6fc20c6
16 changed files with 84 additions and 140 deletions
+6 -16
View File
@@ -55,26 +55,16 @@ namespace zero.Web
pattern: path + "/api/{controller}/{action}/{id?}"
);
if (devPath != null)
{
endpoints.MapFallback(path + "/vue-cli/{**path}", CreateVueProxyDelegate(endpoints, new SpaOptions { SourcePath = devPath }));
}
// fallbacks for SPA
endpoints.MapFallbackToController(path + "/{**path}", "Index", "Index");
});
});
if (devPath != null)
{
app.UseWhen(ctx => !ctx.Request.Path.ToString().StartsWith(path), builder =>
{
builder.UseRouting();
builder.UseEndpoints(endpoints =>
{
RequestDelegate vueDelegate = CreateVueProxyDelegate(endpoints, new SpaOptions { SourcePath = devPath });
endpoints.MapFallback("/{**path}", vueDelegate);
});
});
}
return app;
}
@@ -98,7 +88,7 @@ namespace zero.Web
opt.Options.StartupTimeout = options.StartupTimeout;
}
opt.UseVueCli(npmScript: "vite-dev", port: 3000);
opt.UseVueCli();
});
return app.Build();