Open natew opened 2 months ago
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'
Should work with Vite / esm
I think you can try the Tamagui starter:
npm create tamagui@latest --template=simple-web
And then add moti and run dev:vite
dev:vite
- Moti: latest! - Reanimated: - React Native:
No response
I promise I'll get a better one soon :)
Does vite have any sort of transpiling the way that next.js has transpilePackages?
transpilePackages
Moti uses expo-modules build so presumably any expo module will run into the same issue.
expo-modules build
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
Importing moti via Vite results in some errors, usually in the form of it expecting cjs but getting esm:
Expected Behavior
Should work with Vite / esm
Steps To Reproduce
I think you can try the Tamagui starter:
And then add moti and run
dev:vite
Versions
Screenshots
No response
Reproduction
I promise I'll get a better one soon :)