caridy / es6-module-transpiler-amd-formatter

ES6 Module Transpiler Extension to Output AMD `define()` Format
MIT License
11 stars 3 forks source link

Export "object literal" format doesn't export values #2

Closed nhusher closed 9 years ago

nhusher commented 10 years ago

For the module:

var a = 10,
    b = 20;

export { a, b };

The output of the AMD module transpiler is:

define("test/fixtures/3", ["exports"], function(__exports__) {
    "use strict";

    function __es6_export__(name, value) {
        __exports__[name] = value;
    }

    var a = 10,
        b = 20;
});

The values a and b are not exported from the resulting compiled module.

I've tracked the issue to the buildPrelude function, where it makes some checks against properties I don't really understand. I'd be willing to help work through this issue, I hang out in the #yui channel on freenode most days. I've also opened a pull request importing the failing test.

caridy commented 10 years ago

@nhusher thanks for the report, I will look into it.

caridy commented 9 years ago