In older Nativescript applications development environment was checked:
if (TNS_ENV !== 'production') {
// app is running in development environment
}
This does not work in Nativescript 8. How development environment is checked in nativescript 8?
It seems there is variable called
__DEV__in nativescript 8.TNS_ENV vas defined in old webpack config and webpack config has changed in nativescript 8. Docs mention magic variables and there is variable called
__DEV__. New weback configuration is found hereSo in Nativescript 8 development environment is checked: