LunatiqueCoder / luna

Luna - a React Native + Next.js template. Built with TypeScript :heart:
https://luna-gamma.vercel.app/
MIT License
264 stars 17 forks source link

react-scripts@5 with react-app-rewired #54

Closed LunatiqueCoder closed 2 years ago

LunatiqueCoder commented 2 years ago

So basically I noticed that CRACO is going unmaintained and has no support for react-scripts@5. I also noticed a bunch of people that moved to react-app-rewired as a way around and it seems to be working?

The only issue that I have is with the gesture-handler versions. Any version above 2.3.2 will get an error of webpack@5 here: https://github.com/software-mansion/react-native-gesture-handler/blob/2.4.2/src/utils.ts#L1

I believe this would be the solution: https://stackoverflow.com/a/67216720/14056591

I still haven't tested it roughly, there is room for lots of improvements and stuff can break.

mikehardy commented 2 years ago

I was hoping to chat with you about this! I think this is the right way to go, but it makes me sad, craco was nice. The related CRACO issue hasn't seen any progress though, so...rewired it is. Awesome that you posted this up!