Avoid ejecting CRA if using react-app-rewired
See original GitHub issueI 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 } },
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (9 by maintainers)
Top GitHub Comments
Working procedure here https://github.com/GeekyAnts/NativeBase-KitchenSink/blob/web-support/README.md
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.