Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should stop transpiling to wrong default export syntax #71

Open
buhichan opened this issue Jul 13, 2018 · 3 comments
Open

Should stop transpiling to wrong default export syntax #71

buhichan opened this issue Jul 13, 2018 · 3 comments

Comments

@buhichan
Copy link

Related:
ant-design/ant-design#11263
babel/babel#2212

Should stop using babel-plugin-add-module-exports
Should stop transpiling to wrong module syntax

Should use babel-plugin-add-module-exports@next and turn on addDefaultProperty option.

@buhichan buhichan changed the title Stop supporting babel 5' export default. Should stop transpiling to wrong default export syntax Jul 13, 2018
@yesmeck
Copy link
Member

yesmeck commented Jul 17, 2018

We've tried to remove babel-plugin-add-module-exports, unfortunately, it's a breaking change.

@buhichan
Copy link
Author

I think you can make it backward compatible by make module and module.default both refers to the same thing.


[email protected] (not published currently) has this option:

addDefaultProperty
This will cause a second line of code to be added which aliases the default name to the exported object like so:

module.exports = exports['default'];
module.exports.default = exports['default']

@jch254
Copy link

jch254 commented Jan 19, 2019

Any movement with this? @yesmeck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants