Does React Native production app contain devDependencies?

628 Views Asked by At

I faced the following issue https://github.com/callstack/react-native-testing-library/issues/955. Production build is failed and error points to the library from devDependencies.

1

There are 1 best solutions below

0
On BEST ANSWER

Answer from Satyajit Sahoo on Reddit.

The app contains what you import. Doesn't matter if it's in dependencies, devDependencies or you just created a file. Those fields are to tell npm/Yarn about what to install. Bundling looks only at your imports.

If your bundle contains code from testing library`, then you're importing it into some file that's imported by your entry point.