File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,14 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
58
58
name : "default" ,
59
59
pattern : "{controller}/{action=Index}/{id?}" ) ;
60
60
61
- endpoints . MapToVueCliProxy (
62
- "{*path}" ,
63
- new SpaOptions { SourcePath = "ClientApp" } ,
64
- npmScript : ( System . Diagnostics . Debugger . IsAttached ) ? "serve" : null ,
65
- regex : "Compiled successfully" ) ;
61
+ if ( env . IsDevelopment ( ) )
62
+ {
63
+ endpoints . MapToVueCliProxy (
64
+ "{*path}" ,
65
+ new SpaOptions { SourcePath = "ClientApp" } ,
66
+ npmScript : "serve" ,
67
+ regex : "Compiled successfully" ) ;
68
+ }
66
69
67
70
// Add MapRazorPages if the app uses Razor Pages. Since Endpoint Routing includes support for many frameworks, adding Razor Pages is now opt -in.
68
71
endpoints . MapRazorPages ( ) ;
You can’t perform that action at this time.
0 commit comments