The source of Cordova projects typescript is stored outside the www folder. The generated map file indicates the source to which it is not available. How to configure the post-build event to copy the typescript source to the www folder and update the generated map file to allow the debugger to load the correct typescript source file when a breakpoint is hit?
The first requirement emerged by copying the typescript source files to the www folder. Modify the .jsproj project .jsproj and add the following:
<ItemGroup> <TypeScriptSourceFiles Include="$(ProjectDir)scripts\**\*.ts"></TypeScriptSourceFiles> </ItemGroup> <Target Name="AfterBuild"> <Copy SourceFiles="@(TypeScriptSourceFiles)" DestinationFiles="@(TypeScriptSourceFiles->'$(ProjectDir)www\scripts\ts\%(RecursiveDir)%(Filename)%(Extension)')"></Copy> </Target>
Now I just need to modify the .js.map file and update the sourceRoot attribute?
Any ideas?
qubit source share