Created by: mini-eggs
This PR will be fixing a pain point I've been experiencing in code reuse of React Native projects with Create React App projects. The React Native bundler will allow Android specific code to resolve with a prefixed .android
on the default .js
/.jsx
extension. This PR is allowing that same functionality but with web specific code.
While React Native Web support has been added in in the past, the addition did not follow https://github.com/necolas/react-native-web/blob/master/docs/guides/getting-started.md exactly, missing the added extensions options to the webpack config.
Something I may have missed in the PR is making any additional changes to the file /create-react-app/packages/react-scripts/scripts/utils/createJestConfig.js
. Will there need to be any additional extension resolving here? I'm not too familiar with Jest setups but would be happy to add anything in if I could be pointed in the right direction.
Thanks for looking this PR over, lemme know if there's any problems with the changes here. Excited to contribute.