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

Make export { default } from "…" work #961

Closed
wereHamster opened this issue Feb 29, 2020 · 0 comments · Fixed by #1395
Closed

Make export { default } from "…" work #961

wereHamster opened this issue Feb 29, 2020 · 0 comments · Fixed by #1395
Labels
🦋 type/enhancement This is great to have 🙆 yes/confirmed This is confirmed and ready to be worked on

Comments

@wereHamster
Copy link
Contributor

When I define the page wrapper in a different module and want to use it from an .mdx file, I have to write both an import and export declaration, ie.

import Wrapper from "…"
export default Wrapper

In JavaScript, this is semantically equivalent to:

export { default } from "…"

But mdx-js does not apply the wrapper in that case.

@wereHamster wereHamster added 🙉 open/needs-info This needs some more info 🦋 type/enhancement This is great to have labels Feb 29, 2020
@johno johno added 🙆 yes/confirmed This is confirmed and ready to be worked on 🦋 type/enhancement This is great to have and removed 🙉 open/needs-info This needs some more info 🦋 type/enhancement This is great to have labels Mar 9, 2020
wooorm added a commit that referenced this issue Dec 19, 2020
Previously, only `export default const a = 1` was supported.
This adds support for `export {default} from "a"` and
`export {a as default} from "b"` declarations.

Closes GH-961.
wooorm added a commit that referenced this issue Dec 20, 2020
Previously, only `export default const a = 1` was supported.
This adds support for `export {default} from "a"` and
`export {a as default} from "b"` declarations.

Closes GH-961.
Closes GH-1395.

Reviewed-by: Christian Murphy <[email protected]>
Reviewed-by: John Otander <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦋 type/enhancement This is great to have 🙆 yes/confirmed This is confirmed and ready to be worked on
Development

Successfully merging a pull request may close this issue.

2 participants