Closed
Description
Given a class foo.Foo
with @:expose
, I suppose it is accessible from external by foo.Foo
. However with -D js-flatten
, it is exposed as foo_Foo
.
Example:
package foo;
@:expose
class Foo {
static function main():Void {}
}
Gives:
(function ($hx_exports) { "use strict";
var foo_Foo = $hx_exports.foo_Foo = function() { };
foo_Foo.main = function() {
};
foo_Foo.main();
})(typeof window != "undefined" ? window : exports);
I can't find a way to use -D js-flatten
while maintaining the exposed package object and name. Adding @:native("foo.Foo")
gives exactly the same result.
Activity