@@ -6,11 +6,11 @@ define('mixins', [
6
6
'module'
7
7
] , function ( module ) {
8
8
'use strict' ;
9
-
10
9
var contexts = require . s . contexts ,
11
10
defContextName = '_' ,
12
11
defContext = contexts [ defContextName ] ,
13
- unbundledContext = require . s . newContext ( '$' ) ,
12
+ unbundledContextName = '$' ,
13
+ unbundledContext = contexts [ unbundledContextName ] = require . s . newContext ( unbundledContextName ) ,
14
14
defaultConfig = defContext . config ,
15
15
unbundledConfig = {
16
16
baseUrl : defaultConfig . baseUrl ,
@@ -205,7 +205,10 @@ require([
205
205
var contexts = require . s . contexts ,
206
206
defContextName = '_' ,
207
207
defContext = contexts [ defContextName ] ,
208
+ unbundledContextName = '$' ,
209
+ unbundledContext = contexts [ unbundledContextName ] ,
208
210
originalContextRequire = defContext . require ,
211
+ originalContextConfigure = defContext . configure ,
209
212
processNames = mixins . processNames ;
210
213
211
214
/**
@@ -219,6 +222,15 @@ require([
219
222
return originalContextRequire ( deps , callback , errback ) ;
220
223
} ;
221
224
225
+ /**
226
+ * Wrap original context configuration to update unbundled context,
227
+ * that way it is able to respect any changes done after mixins module has initialized.
228
+ */
229
+ defContext . configure = function ( cfg ) {
230
+ originalContextConfigure ( cfg ) ;
231
+ unbundledContext . configure ( cfg ) ;
232
+ } ;
233
+
222
234
/**
223
235
* Copy properties of original 'require' method.
224
236
*/
0 commit comments