Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Typescript Bundler Issue - Not transforming to JavaScript

DZone's Guide to

Typescript Bundler Issue - Not transforming to JavaScript

· Web Dev Zone
Free Resource

Get the senior executive’s handbook of important trends, tips, and strategies to compete and win in the digital economy.

Today one of the viewers of my Pluralsight course was having issues and I was trying to help him via email, but to no avail.  I asked him to send me his project so I could take a look myself.  I ran the project and sure enough things were odd.  I looked at his Typescript syntax and everything looked right, as you see below.

image

I next took a look to ensure the JavaScript was being loaded correctly and at first glance everything looked right, but then I noticed that the loaded file was NOT JavaScript but rather the raw, untransformed TypeScript.  At this second I knew the issue.  The Bundler was not bundling the Typescript and turning it into JavaScript.

I checked the bundle configuration and everything looked ok, but clearly there was an issue.  After some continued looking I noticed that the TypeScript Bundlertransformer had not been installed. 

Once I added the BundleTransformer.Typescript nuget package and recompile the application the world was a happy place.

Till next time,

P.S. If you are looking to make the jump from XAML based development to HTML development check out my HTML for the XAML Developer Pluralsight course

Read this guide to learn everything you need to know about RPA, and how it can help you manage and automate your processes.

Topics:

Published at DZone with permission of Derik Whittaker, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}