Reputation: 980
This question has 3 parts. I have two modules a
and b
.
b
after it was required initially?a
depends on b
, how do I then update a
to use the new b
? For example;
define('a',['b'],function(b){return {name:'A',other:b}});
define('b',function(){return {name:'B'}});
require(['a']);
require('a');
Upvotes: 3
Views: 2015
Reputation: 980
OK , I figured out 1) using undef
require.undef('b')
define('b',function(){return {name:'B2'}});
2) can use undef
also but it's clunky
require.undef('a')
require.undef('b')
define('b',function(){return {name:'B2'}});
require(['a'])
require('a')
Any answers for part 3?
Upvotes: 4