Skip to content

Commit f1f382c

Browse files
Add developer exception page to webpack template
1 parent 68f3c60 commit f1f382c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/React.Template/reactnet-webpack/Startup.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Microsoft.AspNetCore.Http;
55
using Microsoft.Extensions.Configuration;
66
using Microsoft.Extensions.DependencyInjection;
7+
using Microsoft.Extensions.Hosting;
78
using React.AspNet;
89

910
namespace React.Sample.Webpack.CoreMvc
@@ -33,7 +34,7 @@ public void ConfigureServices(IServiceCollection services)
3334
}
3435

3536
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
36-
public void Configure(IApplicationBuilder app)
37+
public void Configure(IApplicationBuilder app, IHostEnvironment env)
3738
{
3839
// Initialise ReactJS.NET. Must be before static files.
3940
app.UseReact(config =>
@@ -45,6 +46,11 @@ public void Configure(IApplicationBuilder app)
4546
.SetReactAppBuildPath("~/dist");
4647
});
4748

49+
if (env.IsDevelopment())
50+
{
51+
app.UseDeveloperExceptionPage();
52+
}
53+
4854
app.UseStaticFiles();
4955

5056
app.UseRouting();

0 commit comments

Comments
 (0)