opencoweb/coweb — Issue #137: [Optimization] Problems with obtaining the cowebConfig global when building with Dojo 1.7 
Author: rbackhouse
Created: 2011-10-31 13:13:45+00:00
State: open

If a coweb application is built using the Dojo 1.7 builder there appears to be a problem with the coweb/main module getting access to the cowebConfig global variable.

The Dojo 1.7 builder wraps AMD modules with shim code like this :

require({cache:{
....

'coweb/main':function(){

if(typeof cowebConfig === 'undefined') {
var cowebConfig = {};
}

The check for the undefined cowebConfig is returned true when the shim is in place even if a global cowebConfig object has been defined elsewhere.