How should I debug TypeScript files in ASP.NET 5? Suppose solution layout as on the following picture. Notice .ts Scripts are outside wwwroot folder and compiled .js file is getting there via Grunt task. The task also creates .map file which references the original .ts files.
Note however that reference goes outside wwwroot (../Scripts/app.ts). This obviously doesn't work in a browser.
Any idea?
I still have exact the same problem in Visual Studio 2015 Update 1. I solved it by using the following code snippet in Startup.cs:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, IApplicationEnvironment appEnv)
{
app.UseStaticFiles();
if (env.IsDevelopment())
{
app.UseFileServer(new FileServerOptions()
{
FileProvider = new PhysicalFileProvider(System.IO.Path.Combine(appEnv.ApplicationBasePath, "App")),
RequestPath = new PathString("/App"),
});
}
}
All my TypeScript-Files are under /App
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With