I just update Web essentials and Typescript to new version.
Result that my project don't work anymore.
Here's my typescript code:
/// <reference path="DefinitelyTyped/jqueryui.d.ts" />
/// <reference path="DefinitelyTyped/jquery-datatable.d.ts" />
import Common = module("Common");
import GMap = module("GMap");
declare var $: JQueryStatic;
export class Polygon extends GMap.Polygon {
Before update my generated code (that worked) was:
var __extends = this.__extends || function (d, b) {
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
define(["require", "exports", "GMap", "Common"], function(require, exports, __GMap__, __Common__) {
var GMap = __GMap__;
var Common = __Common__;
var Polygon = (function (_super) {
__extends(Polygon, _super);
function Polygon() {
_super.apply(this, arguments);
}
Now it look-like:
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Common = require("./Common");
var GMap = require("./GMap");
var Polygon = (function (_super) {
__extends(Polygon, _super);
In my console I have this error:
Uncaught Error: Module name "Common" has not been loaded yet for context: _. Use require([])
I try to add Common in the config. But before update It s just working fine.
Anyone can help me, maybe something need to be change in my code to have back my project working.
Thanks,
Jérôme
UPDATE
I just see that is due to Web Essentials 2.9, I don't have anymore the option to specify compiler option for amd module.
I just remove the extension and install back the version 2.7:
http://vswebessentials.com/nightly/webessentials2012-2.7.vsix
I would just add to this that Web Essentials does indeed support AMD modules in version 2.8 but that the option has gone missing in 2.9 - check out the comments on the download page.
You'll find the setting (in 2.8 or below) in...
Tools > Options > Web Essentials > TypeScript > "Use the AMD module"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With