Search code examples
nativescriptnativescript-angular

Nativescript environment value getting either Boolean or undefined.


Whenever I try to run the build as below, I get the environment value as Boolearn or undefined, not the actual value of the environment. Anyone find that how to take the value instead of boolean value.

Command to run the build

tns build android --bundle --env.url="xxxxxxxx"
{"url":true,"android":true}

I have referred native script's forum, where no one replied. For your refernece, find the below url.

Native script forum URL


Solution

  • Which version of CLI you are using? It was a known issue in 3.x, values will be only passed as boolean. Since 4.x, the issue was resolved and accepts string values too.