oklas / react-app-alias

:label: Alias and multiple src directory for craco or rewired create-react-app
MIT License
173 stars 18 forks source link

Cannot set properties of undefined (setting 'exports') #100

Open theIYD opened 1 year ago

theIYD commented 1 year ago

I have a monorepo setup (using TurboRepo) with my CRA app with Craco, inside apps/* folder and a design system inside packages/* folder. The paths to the design system are setup in tsconfig.json.

Previously, I was using the the old plugin craco-alias. I have replaced it with react-app-alias-ex.

However it sometimes does not work with hot reloading i.e when a change is made inside packages/*, I see Cannot set properties of undefined (setting 'exports') as an error on the browser while the craco process shows Files successfully emitted, waiting for typecheck results.... I have to shutdown the server and restart.

Any solutions ?