File tree Expand file tree Collapse file tree
src/React.Template/reactnet-webpack Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44using Microsoft . AspNetCore . Http ;
55using Microsoft . Extensions . Configuration ;
66using Microsoft . Extensions . DependencyInjection ;
7+ using Microsoft . Extensions . Hosting ;
78using React . AspNet ;
89
910namespace 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 ( ) ;
You can’t perform that action at this time.
0 commit comments