/// <amd-module />
By default AMD modules are generated anonymous. This can lead to problems when other tools are used to process the resulting modules, such as bundlers (e.g. r.js
).
The amd-module
directive allows passing an optional module name to the compiler:
amdModule.ts
1 2 3 | ///<amd-module name="NamedModule"/> export class C { } |
Will result in assigning the name NamedModule
to the module as part of calling the AMD define
:
amdModule.js
1 2 3 4 5 6 7 8 | define( "NamedModule" , [ "require" , "exports" ], function (require, exports) { var C = ( function () { function C() { } return C; })(); exports.C = C; }); |
Please login to continue.