Dev / Production mode ( __DEV__ var )

Hi,

I’m using this little code to have a flag between production or developement mode :

export const isProduction = !__DEV__;

It works fine when I’m using

expo start

the code is in developement mode while when I’m using :

expo start --no-dev --minify

The flag is true …

BUT when trying to do some build ( with turtle-cli or publishing it on expo servers … ) the “DEV” var seems not to be false … Why ? :frowning:

$ expo diagnostics

Expo CLI 4.9.1 environment info:
    System:
      OS: Windows 10 10.0.19042
    Binaries:
      Node: 14.9.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
      npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
    SDKs:
      Android SDK:
        API Levels: 29, 30
        Build Tools: 28.0.3, 29.0.2, 30.0.3, 31.0.0, 31.0.0
        System Images: android-30 | Google APIs Intel x86 Atom
    npmPackages:
      expo: ^42.0.0 => 42.0.3
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2
      react-native-web: ~0.13.12 => 0.13.18
    Expo Workflow: managed

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.