Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite Compat! #339

Open
2 of 3 tasks
natew opened this issue Apr 8, 2024 · 2 comments
Open
2 of 3 tasks

Vite Compat! #339

natew opened this issue Apr 8, 2024 · 2 comments

Comments

@natew
Copy link

natew commented Apr 8, 2024

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
Copy link
Owner

Does vite have any sort of transpiling the way that next.js has transpilePackages?

@nandorojo
Copy link
Owner

Moti uses expo-modules build so presumably any expo module will run into the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants