为什么Underscore.js会删除对AMD的支持? [英] Why did Underscore.js remove support for AMD?

查看:167
本文介绍了为什么Underscore.js会删除对AMD的支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


1.3.0 - 2012年1月11日从Underscore移除了AMD(RequireJS)支持。如果您想将Underscore与RequireJS一起使用,您可以将其作为普通脚本加载,包装或修补您的副本,或下载分叉版本。

1.3.0 — Jan. 11, 2012 Removed AMD (RequireJS) support from Underscore. If you'd like to use Underscore with RequireJS, you can load it as a normal script, wrap or patch your copy, or download a forked version.

他们为什么要这样做?有人知道吗?因为他们仅在几个月前(10月)添加了它,并且AMD(异步模块定义)表示远远优于CommonJS模块。

Why have they done it? Does anyone know? Because they added it only few month ago (in October), and AMD (Asynchronous Module Definition) is said to be far superior to CommonJS modules.

更新:截至2013年12月,再次受到支持。

Update: As of December 2013, this has been supported again.

推荐答案

Jeremy 提交的评论


是的。不支持特定的脚本加载器肯定会使所有更容易正常工作。

我为合并第一个支持而道歉地方。

I apologize for merging the support in the first place.

他还推文关于更改的更多内容(来自的链接稍后的评论):

He also tweeted a bit more on the change (link from a later comment):


...因为AMD的支持正在打破常见的Underscore嵌入在也恰好使用Require.js的页面上...

… because AMD support is breaking regular Underscore embeds on pages that also happen to use Require.js …

这篇关于为什么Underscore.js会删除对AMD的支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆