DEV Community

Discussion on: Using emotionJs with Vite

Collapse
 
ondevto profile image
205g0

Nice post! How would this work with Typescript? With your solution TS complains that css does not exist on that type...

Collapse
 
glocore profile image
glocore

I faced the same issue, adding this to tsconfig.json fixed it for me:

"compilerOptions": {
  "types": ["vite/client", "@emotion/react/types/css-prop"]
}
Enter fullscreen mode Exit fullscreen mode