As I'm building various app's in Web AppBuilder (DE) and deploying them on our web server (Web Adaptor machine), I notice that some of them require a tweak in env.js where no apiUrl is set. In my case, adding the line below has always worked.
apiUrl = 'http://js.arcgis.com/3.31/',
But I'm not sure how env.js file is generated or updated by WAB throughout development. My suspicion is that as you add custom developed widget (either home grown or sources elsewhere), the need for this arises whereas something straight out of WAB doesn't need this? Can anyone shine some light on this for me?