Open UseMuse opened 5 years ago
Hey @UseMuse !
Just seeing this now, did you have any other issues with this upgrade? I need to take a deeper look, I know that with NodeServices etc deprecated I'm wondering what kind of issues we might experience here
@MarkPieszak
//the design is obsolete
// Webpack initialization with hot-reload.
app.UseWebpackDevMiddleware (new WebpackDevMiddlewareOptions
{
HotModuleReplacement = true,
});
suggest using Use Microsoft.AspNetCore.SpaServices.Extensions
I just marked the Configure method as Obsolete
design
app.UseMvc (routes =>
{
routes.MapRoute (
name: "default",
template: "{controller = Home} / {action = Index} / {id?}");
routes.MapSpaFallbackRoute (
name: "spa-fallback",
defaults: new {controller = "Home", action = "Index"});
});
gives a warning:
Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing. To continue using 'UseMvc', please set 'MvcOptions.EnableEndpointRouting = false' inside 'ConfigureServices'.
In the ConfigureServices Method in replaced it
services.AddMvc ()
.SetCompatibilityVersion (CompatibilityVersion.Version_2_2);
on this
// Add framework services.
services.AddMvc (opt => opt.EnableEndpointRouting = false)
.SetCompatibilityVersion (CompatibilityVersion.Version_3_0);
//with explicit opt => opt.EnableEndpointRouting = false
also a discussion on my proposed update can be seen here: https://github.com/TrilonIO/aspnetcore-Vue-starter/issues/138
@Laranjeiras did you start with my fork? what mistake do you have?
adaptation of the project for asp core 3.0 with hot reload by Westwind.AspnetCore.LiveReload,because hot reload from asp core 2.2 stopped working