The AMD output of traceur has me a bit confused. The return value looks a lot like an ES6 class - shouldn't this be converting all the way to ES5? FWIW, my options (to traceur) are:
{
modules: "amd",
outputLanguage: 'es5'
}
define([], function() { | |
"use strict"; | |
var myVar = {}; | |
var $__default = myVar; | |
return { | |
get default() { | |
return $__default; | |
}, | |
__esModule: true | |
}; | |
}); |
var myVar = {}; | |
export default myVar; |
Agreed with @eventualbuddha, that example would work because of partially loaded modules.
edit: This was posted way after composing it, and a few comments were posted before it.