question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avoid ejecting CRA if using react-app-rewired

See original GitHub issue

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 } },

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Timercommented, Nov 11, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overriding the Create-React-App Webpack Configuration ...
And ejecting is often a bad idea because it means that you will no longer benefit from the updates of Create-React-App.
Read more >
Don't eject your Create React App | by Adam Laycock - Medium
Great reason! After you've set up a new CRA project to your liking, use the command at the bottom of this article to...
Read more >
Stop Ejecting Create React App - YouTube
Instead of ejecting CRA (Create # React App ) you can get access to many option by using Craco. In this lesson we...
Read more >
Customize Create React App (CRA) without ejecting using ...
This lesson shows you how to use the react-app-rewired library to customize CRA and its Webpack config without ejecting.
Read more >
Don't Eject! – Why to Leave your Create React App in the Disc ...
Following on that point, CRA actually has more configuration than you think. There are a number of tools — like React App Rewired...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found