New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid ejecting CRA if using react-app-rewired #2206
Comments
You can check something similar with NativeBase KitchenSink web-support |
Exactly, that's where my code dumps above are from. Do you have any suggestion on how to use react-app-rewired to integrate these resolvers without ejecting the app? |
What is the negativity |
The docs on CRA states it quite clearly: "You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. " In other words - I will have to maintain all Webpack configurations myself if I eject and that's a unnecessary burden for most developers. |
I assumed this to be NativeBase eject process (theme eject) |
We have not tried NativeBase with CRA without ejecting |
If you'd accomplish avoiding the eject successfully, please share the knowledge as I think that would benefit a lot of people. |
I stated this above that,
And this process has been accepted by many of NativeBase users. So far we haven't received any request for this approach. So we would stick to this, unless we have many requests coming in for this. |
I see.
So to sum it up, if it possible to avoid ejecting CRA - I cannot see any reasonable argument why to not avoid it? |
We can consider this, but then not at higher priority |
I totally understand that, thank you 🙂 |
I'd really like to see NativeBase compatibility with a non-ejected copy of Create React App. Let me know if there's anything we can do to help. |
@Timer @axhamre @SupriyaKalghatgi The below should work if you're using CRA v2.
I'm using typescript, so |
@platypusrex Not success though |
Working procedure here |
@SupriyaKalghatgi Hmm - looks like it pretty much got you where you needed to go, though! You're welcome! 😜 |
@platypusrex Though there is compatibility issue with latest react and react navigation |
I have a cross platform, using the same code on iOS and web. To use NativeBase on web I'm instructed to eject my CRA.
As ejecting comes with some negatives, I wonder if anyone knows how/has experience to include the webpack configurations below without ejecting the app, e.g. by using
react-app-rewired
?alias: { "react-native/Libraries/Renderer/shims/ReactNativePropRegistry": "react-native-web/dist/modules/ReactNativePropRegistry", "react-native": "react-native-web" },
{ test: /\.(js|jsx|mjs)$/, include: [ paths.appSrc, path.resolve(paths.appNodeModules, "native-base-shoutem-theme"), path.resolve(paths.appNodeModules, "react-navigation"), path.resolve(paths.appNodeModules, "react-native-easy-grid"), path.resolve(paths.appNodeModules, "react-native-drawer"), path.resolve(paths.appNodeModules, "react-native-safe-area-view"), path.resolve(paths.appNodeModules, "react-native-vector-icons"), path.resolve( paths.appNodeModules, "react-native-keyboard-aware-scroll-view" ), path.resolve(paths.appNodeModules, "react-native-web"), path.resolve(paths.appNodeModules, "react-native-tab-view"), path.resolve(paths.appNodeModules, "static-container") ], loader: require.resolve("babel-loader"), options: { cacheDirectory: true } },
The text was updated successfully, but these errors were encountered: