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

import _JSXStyle2 from "styled-jsx/style"; when my components's props use destructuring #696

Closed
SweetSweetME opened this issue Jan 26, 2021 · 4 comments · Fixed by #724
Closed

Comments

@SweetSweetME
Copy link

👋 friend. Welcome to styled-jsx and thanks for contributing!

⚠️ IMPORTANT ⚠️

If you need help or have a question about styled-jsx please ask it on Spectrum https://spectrum.chat/styled-jsx or join our Slack community at https://zeit.chat and ask it in the #next channel.

Before you open a new issue please take a look at our Frequent Asked Questions and open issues.

Remember, often time asking in chat or looking at the FAQ/issues can be faster than waiting for us to reply to a new issue*.

If you are here to report a bug or request a feature please remove this introductory section and fill out the information below!


Do you want to request a feature or report a bug?

What is the current behavior?

when i use destructuring in component, i will got an error about _JSXStyle because of import _JSXStyle2 from "styled-jsx/style"; not import _JSXStyle from "styled-jsx/style";

If the current behavior is a bug, please provide the steps to reproduce and possibly a minimal demo or testcase in the form of a Next.js app, CodeSandbox URL or similar

  1. webpack 4.32.2
  2. @babel/core 7.4.5

What is the expected behavior?

normal working

Environment (include versions)

  • OS:
  • Browser:
  • styled-jsx (version): 3.4.0 and 3.4.1;both happen

Did this work in previous versions?

@SweetSweetME
Copy link
Author

SweetSweetME commented Jan 26, 2021

Can't reproduce in the Babel REPL but I reproduce in my local.
This is an example:
https://github.com/SweetSweetME/styled-jsx-test

@Timer Timer added the bug label Jan 29, 2021
@unix
Copy link

unix commented Feb 14, 2021

I also have this issue with the latest version, when I use version styled-jsx@3.3.0, everything works fine.

My project was stable and reproducible in the latest version, then I modified the version to work properly, maybe this will help you to reproduce the issue: commit

@github-actions
Copy link

github-actions bot commented Aug 2, 2021

🎉 This issue has been resolved in version 3.4.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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