Closed DavidWells closed 3 years ago
I guess this is an error in your setup, Mantine does not use emotion. I've set up example project with vite – everything works fine, you can try it out here – https://github.com/rtivital/vite-mantine-example
To bootstap your repo with mantine and vite use commands from vite docs:
yarn create @vitejs/app mantine-vite --template react-ts
yarn add @mantine/hooks @mantine/core react-jss
https://github.com/rtivital/vite-mantine-example works! Thanks for this.
The odd part about that emotion error is the file path is pointing to the /title/title.d.ts
file in mantine core dir and it appears like the built files were missing
Anywho, closing this out as it's probably some random npm install issue.
Had some odd typescript errors today trying to use mantine in a new vite app.
I added the example app from https://github.com/mantinedev/mantine-next-example/blob/master/components/TodoList.jsx to this repo https://github.com/DavidWells/redux-toolkit-vite-example and got these errors
I wasn't able to find any references to
emotion
via github search https://github.com/mantinedev/mantine/search?q=emotion.aside: Vite uses esmodules and I've seen it act odd with different NPM packages but it's crazy fast at starting/building. Would be cool to get mantine working with a vite example 😃
You can test this out with a fresh vite app via: