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

named exports #5

Closed
threepointone opened this issue Jul 8, 2017 · 2 comments
Closed

named exports #5

threepointone opened this issue Jul 8, 2017 · 2 comments

Comments

@threepointone
Copy link

libs like emotion will need to export multiple macros, so babel-macros could support named exports, such that the following works.

import { styled, css } from 'emotion/macros'

let red = css` color: red `

let Heavy = styled('div')`
  composes: ${red};
  font-weight: bold;
`

// ... etc ...
@kentcdodds
Copy link
Owner

Ok, so I changed the API a little bit to accommodate for allowing you to process each named import in the order you need so you can do what you need to. See this example of the API. Right now this only works for import. Wont work for destructuring requires (yet).

Let me know if that works for you.

@kentcdodds
Copy link
Owner

Just updated the preval macros

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

2 participants