I'm working on a react app that uses Firebase Functions as its backend. My folder hierarchy is set up so that my functions project is inside the project for the react app:
/my-project
/functions
index.ts
(...)
/src
App.tsx
index.tsx
(...)
I want to have Typescript typecheck the data I send to my Firebase Functions, and to do that it would be useful to be able to share code between my React App and my Functions.
For a while I was doing this just by symlinking a folder inside functions
to one inside src
, which worked for a while until I added enums. It turns out that symlinks under src
are not actually supported by CRA, and the fact that it was working at all was a fluke.
In the past people seem to have gotten around this using react-app-rewired, customize-cra, and craco, but none of these are maintained anymore and none of them support CRA 5.0.
So, what should I do now?