-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
CSS variables override not working with Vite #44175
Comments
I think it's because your package is declaring That's why the theming does not work because the component is using a different version. You should move the those dependencies to |
I tried to add as peer deps at root package.json and react-kit package.json, both didn't work. |
Does it work with Next.js instead of Vite? |
Haven't tried in Next.js but works in CRA. Not sure if the issue is with Vite. |
Here is reproduction in next.js. It doesn't even compile and I see below error
|
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @pavankjadda How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
Link to live example: (required)
StackBlitz: https://stackblitz.com/edit/github-8oqtfo?file=src%2Fmain.tsx
CodeSandbox: https://codesandbox.io/p/github/pavankjadda/mui-css-variables/draft/quizzical-ritchie
Github: https://github.com/pavankjadda/mui-css-variables
Steps:
npm run dev
Current behavior
Color overriden in theme is not being applied
Expected behavior
Overridden color should apply as expected
Context
<ManageButton onClick={() => console.log('Button clicked')}>Library Button</ManageButton>
This works in react-scripts+MUI project not with vite+MUI
Your environment
npx @mui/envinfo
Search keywords: vite
The text was updated successfully, but these errors were encountered: