[styled-engine-sc] Fix compatibility with Vite and Vitest#48558
Merged
Conversation
Deploy previewhttps://deploy-preview-48558--material-ui.netlify.app/ Bundle size
Check out the code infra dashboard for more information about this PR. |
Member
|
Is this fix specific for styled-components version? |
siriwatknp
approved these changes
May 21, 2026
Member
Author
It's for styled-components v6 so this fix will be good for Material UI v9 + v7 |
|
Cherry-pick PRs will be created targeting branches: v7.x |
mj12albert
added a commit
that referenced
this pull request
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preview: https://stackblitz.com/edit/6m4j77c8-fh3enqae?file=src%2FDemo.test.tsx
Ctrl+Cto kill the app in the Stackblitz terminal, then runnpm run testand see the test passes.Without the fix (v9 repro) a
scStyled is not a functionerror will be thrownFixes #46586