wallabyjs / quokka

Repository for Quokka.js questions and issues
https://quokkajs.com
1.17k stars 31 forks source link

add React native support please #923

Closed garrettmac closed 6 months ago

garrettmac commented 7 months ago

Issue description or question

React Native started importing/exporting its package using flow type syntax its causing Quokka/Wallaby to not know how to run RN files resulting in the following error

Screenshot 2023-12-18 at 9 46 32 AM

Adding support for flow i think is all you need to add for React native to work again.

This is a good starting point. https://flow.org/en/docs/react/ https://flow.org/en/docs/tools/babel/

smcenlly commented 7 months ago

I can see from your Quokka output that you don't have Quokka configured to use Babel for your project.

I think that if you configure Quokka to use babel with the transformers mentioned in the flow docs, then Quokka should work for you.

smcenlly commented 7 months ago

Were you able to try our suggestion? Updating your project to use babel should have fixed your problem.

smcenlly commented 6 months ago

I'm assuming that configuring babel solved your problem. If you're still having problems, please provide us with a sample repo and we will take a look at the babel configuration for you.