Open nicknisi opened 7 years ago
Given a TS module like the following:
export = { foo: true, bar: 'baz' };
With the following UMD output:
(function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define(["require", "exports"], factory); } })(function (require, exports) { "use strict"; return { foo: true, bar: 'baz' }; });
The loader outputs the following (a top-level return statement):
"use strict"; return { foo: true, bar: 'baz' };
Ideally, this should output:
"use strict"; exports = { foo: true, bar: 'baz' };
Given a TS module like the following:
With the following UMD output:
The loader outputs the following (a top-level return statement):
Ideally, this should output: