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

Edited Unassigned: Typescript Transformer chokes on libraries [101]

$
0
0
In trying to get the TypeScript Transformer to work, I've run into a peculiar problem.

I am trying to compile an app that uses **angular**, so my `BundleConfig` has this in it...

```
bundles.Add(new Bundle("~/bundles/js", new ScriptTransformer()) {
.Include("~/application/assets/js/angular.js")
});

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

The `app.ts` page is very simple, it looks like this;

```
((): void => {
'use strict';

angular
.module('app', ['kendo.directives']);
})();
```
You don't really get much simpler than that. But when I try to run it, `BundleTransformer` tells me that `angular` is not defined.

This is problematic, because there are a lot of libraries that I, and others, need to use - does this mean that we cannot use BundleTransformer on anything that is not natively declared by the TypeScript library? I _do_ have `angularjs.d.ts` in my project, but it's a definition file, so you don't load it at runtime - even if you try to, it doesn't work.

Is there a way around this? I'd really like to use BundleTransformer, but if it can't understand the most rudimentary things like that, I'll be forced out of it unfortunately.

Viewing all articles
Browse latest Browse all 698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>