Skip to content

Emit __esModule in when target == es6#5907

Closed
mhegazy wants to merge 4 commits into
masterfrom
emitESModuleInES6
Closed

Emit __esModule in when target == es6#5907
mhegazy wants to merge 4 commits into
masterfrom
emitESModuleInES6

Conversation

@mhegazy
Copy link
Copy Markdown
Contributor

@mhegazy mhegazy commented Dec 3, 2015

Emits __esModule if target == ES6 and module != ES6. also add emitting __esModule to export default class, which we missed before.

More details about this can be found in #5844 (comment)

Comment thread src/compiler/utilities.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this was supposed to be part of this PR (though it certainly seems correct!)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add that then in your PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I just open a new PR for it? :3

@weswigham
Copy link
Copy Markdown
Member

I think #5908 may be a better fix since it removes a bunch of redundant emitter logic, also I'm not sure we really need a test dedicated to this, since it manifests in every es6 module compliance test with a default export (which is many of them).

@mhegazy mhegazy closed this Dec 3, 2015
@mhegazy mhegazy deleted the emitESModuleInES6 branch December 3, 2015 05:03
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants