We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
测试时偶尔发现的,3.0版本不存在这个问题,2.3版本中发现有这个问题。
描述:两个模块a.js、b.js ,如果a 、b间存在相互依赖,那么模块间的依赖加载会有问题。 再推广一下就是,如果模块间存在依赖环的话,模块间的依赖加载会有问题。
发现3.0中用Module.prototype.pass修复了该问题,
测试代码,现象就是在2.3中,a.doSomething()不会执行,3.0中会执行 seajs.use("a" , function(a){ a.doSomething(); });
a.js define(function(require, exports , module) { var b = require("b"); exports.doSomething = function() { console.log("in a"); }; });
b.js define(function(require, exports, module) { var c = require("c"); exports.doSomething = function() { console.log("in b"); }; });
c.js define(function(require, exports, module) { var a = require("a"); exports.doSomething = function() { console.log("in c"); }; });
The text was updated successfully, but these errors were encountered:
3.0的循环依赖处理和node一样了,之前不支持。
Sorry, something went wrong.
哈哈,还是要谢谢你们开发出这么棒的产品!
No branches or pull requests
测试时偶尔发现的,3.0版本不存在这个问题,2.3版本中发现有这个问题。
描述:两个模块a.js、b.js ,如果a 、b间存在相互依赖,那么模块间的依赖加载会有问题。
再推广一下就是,如果模块间存在依赖环的话,模块间的依赖加载会有问题。
发现3.0中用Module.prototype.pass修复了该问题,
测试代码,现象就是在2.3中,a.doSomething()不会执行,3.0中会执行
seajs.use("a" , function(a){
a.doSomething();
});
a.js
define(function(require, exports , module) {
var b = require("b");
exports.doSomething = function() {
console.log("in a");
};
});
b.js
define(function(require, exports, module) {
var c = require("c");
exports.doSomething = function() {
console.log("in b");
};
});
c.js
define(function(require, exports, module) {
var a = require("a");
exports.doSomething = function() {
console.log("in c");
};
});
The text was updated successfully, but these errors were encountered: