seajs.use,或require
确实,如果require的是未封装模块,此时的seajs降级为像LABjs的文件加载器。如果所有的文件都是未封装的模块,用LABjs好了。另外,seajs调用未封装的模块,像玉伯说的,seajs会注册模块,状态码为1,module.exports 为 undefined。还有个有意思的现象,如果seajs再去调用这个模块,状态码变成4,module.exports 为空对象。1.2的seajs版本。2012-07-20
honingwon
发件人:Frank Wang发送时间:2012-07-20 22:59主题:Re: seajs引入基础javascript库的做法
收件人:"seajs"<seajs@googlegroups.com>
很同意 honingwon 的观点
收件人:"seajs"<se...@googlegroups.com>
很同意 honingwon 的观点
收件人:"seajs"<se...@googlegroups.com>
这段只是普通的js,代理就是用define封装一下全局变量在其他地方的使用该代理模块就完全兼容CMD了
--
You received this message because you are subscribed to the Google Groups "seajs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seajs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.