Quantcast
Channel: bundletransformer Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 698

Commented Unassigned: Typescript configuration continuously fails [99]

$
0
0
I am attempting to use the popular library BundleTransformer] to compile `TypeScript` in my application.

I have it successfully compiling `.less`, `.css`, `.js`, and `.sass`, but the same pattern isn't working for TypeScript.

Essentially, here is my build process ->

1. Download `BundleTransformer:Core` from _NuGet_
2. Download `BundleTransformer:TypeScript` from _NuGet_
3. Download `JavaScript Engine Switcher for .NET: MSIE` from _NuGet_
4. Add the following to my `web.config`


This is in addition to the defaults that BundleTransformer adds.

<bundleTransformer ... >
<less ... >
<jsEngine name="MsieJsEngine" />
</less>
<typeScript>
<jsEngine name="MsieEngine" />
</typeScript>
</bundleTransformer>

5. Use the following in my `BundleConfig.cs`

This is the recommended method by the docs [bundle transformer docs][2]

bundles.Add( new Bundle( "~/bundles/js/app", new ScriptTransformer() )
.Include("~/application/assets/angular/app.ts" )
);

6. Render the scripts in my `_Layout.cshtml`

This is the same for BundleTransformer and ASP.NET Web Optimization Framework

@Scripts.Render( "~/bundles/js/app" )

But it doesn't work. It doesn't give me an error, it just plain does not turn the `.ts` into anything. It's like it completely ignores it. The docs are not being very helpful, either. Can anyone assist?


[1]: https://bundletransformer.codeplex.com/
[2]: https://bundletransformer.codeplex.com/wikipage?title=Bundle%20Transformer%3A%20TypeScript
Comments: Okay, I discovered the problem. For some reason my web.config had become corrupted. When I deleted the web.config and re-typed it word for word, things began to work fine. I am unsure what happened. My only guess is that the encoding got changed without me realizing it.

Viewing all articles
Browse latest Browse all 698

Trending Articles