-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
[docs] Add Vite/Vitest configuration for styled-components #47042
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
base: master
Are you sure you want to change the base?
[docs] Add Vite/Vitest configuration for styled-components #47042
Conversation
|
I've submitted a PR to add the Vite/Vitest configuration to the styled-components documentation. The documentation now includes both the |
Netlify deploy previewBundle size report
|
| The `inline` option provides better performance and is the recommended approach for most projects. | ||
|
|
||
| :::info | ||
| You must also override `styled-engine` in your `package.json` when working with Vite + Vitest, otherwise Vitest will resolve `@mui/styled-engine` instead of `@mui/styled-engine-sc`. See the [installation instructions](#installation) above for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The redirect link (#installation) does not work.
Fixes #46586
Summary
Added documentation for Vite/Vitest configuration when using styled-components with MUI v7+, addressing ESM/CJS compatibility issues.
Changes
fallbackCJS(simpler) andinlinedependencies (faster)Related Issues