I'm creating an React-Native App, which is working fine on the emulator on DEBUG mode. However, when I tried on on RELEASE mode, it crashes because of a failing module.
The ADB Logcat points to this message as a cause of the exception:
ReactNativeJS: Requiring unknown module "./locale/pt-br".
I know it's being caused by a call to method "updateLocale" of momentJS library. This call is placed inside the "react-native-calendar-strip" component, when I need to set a different locale options.
I've tried a lot of different combinations on import statements, none of them working.
This is what I tried:
import moment from 'moment';
import 'moment/locale/pt-br';
or
import moment from 'moment/min/moment-with-locales';
I also tried to require the locale
require('moment/locale/pt-br');
Any other suggestion ?