Vite Compat!
natew opened this issue · 2 comments
natew commented
Is there an existing issue for this?
- I have searched the existing issues
Do you want this issue prioritized?
- Yes, I have sponsored
- Not urgent
Current Behavior
Importing moti via Vite results in some errors, usually in the form of it expecting cjs but getting esm:
/takeout/test/node_modules/@tamagui/animations-moti/node_modules/moti/author/index.js:1 export * from '../build/author'
Expected Behavior
Should work with Vite / esm
Steps To Reproduce
I think you can try the Tamagui starter:
npm create tamagui@latest --template=simple-web
And then add moti and run dev:vite
Versions
- Moti: latest!
- Reanimated:
- React Native:
Screenshots
No response
Reproduction
I promise I'll get a better one soon :)
nandorojo commented
Does vite have any sort of transpiling the way that next.js has transpilePackages
?
nandorojo commented
Moti uses expo-modules build
so presumably any expo module will run into the same issue.