Include TypeScript files in azure git deploy Include TypeScript files in azure git deploy azure azure

Include TypeScript files in azure git deploy


So after a lot of work it turns out that with the msbuild pipeline piece (#2) it will actually deploy the typescript files. One thing that I was missing was adding the appropriate mime type to handle typescript files.

It turns out by default IIS won't serve the TypeScript files correctly.

To add the Custom mime type I did:

<system.webServer>    <staticContent>      <remove fileExtension=".ts"/>      <mimeMap fileExtension=".ts" mimeType="text/plain" />    </staticContent></system.webServer>

It's important that we remove the existing .ts mime type (if there is one) prior to adding the mime type. If you deploy onto a machine that has the .ts mime type already and you do not remove prior to adding, it will pretty much destroy your existing mappings and will fail to serve any css, js files etc.

This has been a battle but I finally got it working, hope this helps somebody else in the future!