jQuery 如何连接其来源并摆脱其 AMD 定义

How does jQuery concatenate its sources and gets rid of its AMD definitions

我看到 jQuery 在其来源中使用了 AMD。然而,在他们串联的 dist 文件中,所有 AMD 参考都消失了。他们如何构建脚本,摆脱 AMD 并仍然保持源代码的功能?

它使用 requirejs 优化器(又名 r.js)以及许多自定义项,包括几个正则表达式。学习 the source of the "build" grunt task 将提供更多详细信息。