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

Add failing test case #364

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Janpot
Copy link

@Janpot Janpot commented Nov 29, 2021

Ran into this while debugging another problem. babel-plugin-styled-components doesn't recognise these imports:

import { styled as matStyled } from '@mui/material/styles'

"ssr": true,
"topLevelImportPaths": [
"@mui/material",
"@mui/material/*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW at HEAD right now this doesn't work. You need a regex. I have a PR to change this to picomatch

@agriffis
Copy link
Contributor

agriffis commented Apr 5, 2022

Is this still an issue on v2.0.6?

@MonstraG
Copy link

MonstraG commented Apr 26, 2022

Not OP, but this PR is mentioned in open mui/material-ui#29742, so I guess it is still an issue.

@@ -0,0 +1,14 @@
import { styled as matStyled } from '@mui/material/styles';
import sc from '@mui/material/styles';
const Test1 = matStyled('div').withConfig({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really want it to transform matStyled? According to this issue this isn't wanted: #224

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't want to do this in v4, because the styled there was not using styled-components. For v5, when the @mui/system is configured to use styled-components, we want the plugin to process these imports.

@slavco86
Copy link

slavco86 commented Mar 5, 2023

@Janpot , @rbong - any update on this, please? 🙏

@landsman
Copy link

Hello, is there a plan how to fix 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 this pull request may close these issues.

8 participants