mui / pigment-css

Pigment CSS is a zero-runtime CSS-in-JS library that extracts the colocated styles to their own CSS files at build time.
MIT License
396 stars 19 forks source link

[vite] Importing extendTheme() in vite app crashes #68

Open oliviertassinari opened 1 month ago

oliviertassinari commented 1 month ago

Steps to reproduce

Add

import { extendTheme } from '@pigment-css/vite-plugin';

extendTheme({});

to any of your pages

Current behavior

SCR-20240510-bxow

Expected behavior

No error

Context

I would like to use the theme value directly in JavaScript, in my case for https://github.com/oliviertassinari/react-conf-2024-pigment-css/blob/b55ff16e86831ac790972659546bc01484861c19/src/App.tsx#L30.

Your environment

npx @mui/envinfo ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```

Search keywords: -