viewstools / yarn-workspaces-cra-crna

How to use yarn workspaces with Create React App and Create React Native App (Expo) to share common code across
151 stars 23 forks source link

doesn't work after ejecting #3

Open dalinarkholin opened 6 years ago

dalinarkholin commented 6 years ago

Any chance some steps could be put together to get this working after ejecting?

I get a unable to resolve module error. npm start -- --reset-cache does not fix nor the steps the error recommends.

Let me know thanks!

dariocravero commented 6 years ago

Hey @dalinarkholin, can you share a failing repo? What issues are you seeing? Thanks!

dariocravero commented 6 years ago

@dalinarkholin, after replying to your message I saw your comment here https://github.com/react-community/create-react-native-app/issues/232#issuecomment-354550761. If not linking expo works, perhaps it can be put as a flag in https://github.com/viewstools/yarn-workspaces-cra-crna/blob/master/crna-make-symlinks-for-yarn-workspaces/index.js#L22? Then we would explain on the docs that you can set an option like isExpo: false? Could you do a PR if that works? Thanks!

cheshirecode commented 6 years ago

Great stuff @dariocravero. Just to follow up that I've got a working setup with ejected RN in https://github.com/cheshirecode/cra-rni-monorepo by uncommenting Expo reference . Definitely needs a flag for https://github.com/viewstools/yarn-workspaces-cra-crna/blob/master/crna-make-symlinks-for-yarn-workspaces/index.js#L22 or link Expo only if it exists as a dependency, not sure what is the best way to handle this. Perhaps we could detect if native package has been ejected or not, hmmm...