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

Babel 7 compatibility for babel-plugin-emotion #437

Closed
matuscongrady opened this issue Oct 29, 2017 · 2 comments · Fixed by #440
Closed

Babel 7 compatibility for babel-plugin-emotion #437

matuscongrady opened this issue Oct 29, 2017 · 2 comments · Fixed by #440
Assignees

Comments

@matuscongrady
Copy link

Hello,

  • emotion version: latest (8.0.9)
  • babel-plugin-emotion version: latest (8.0.9)
  • babel version: 7.0.0-beta3

I'm having an issue when trying to compile using babel 7.
image

Here's where the error is coming from:
image

After console.logging I realized that metadata property on state.file is an empty object

The problem doesn't come from any plugin incompatibility. It doesn't work even with the simplest .babelrc / .babelrc.js file

{
  "plugins": ["emotion"]
}

Babel 7 is still in beta, but it has a lot of benefits (most notably babel-preset-env that can include only polyfills for features that are actually used (!) by your code).

Please, look into it. Thanks!

@tkh44
Copy link
Member

tkh44 commented Oct 29, 2017

Thank you for filing an issue for this. We should get this fixed before the Babel 7 release. Would you want to give this a try @mcongy? Here is an example where they polyfill for babel/babel#6343

AvokaTech/babel-plugin-lodash@af42398

@matuscongrady
Copy link
Author

@tkh44 Hello, I'm sorry but I'm completely new to developing a babel-plugin. That means, I'm not a good candidate for this.

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

Successfully merging a pull request may close this issue.

3 participants