bleepingcoder
bleepingcoder.com uses publicly licensed GitHub information to provide developers around the world with solutions to their problems. We are not affiliated with GitHub, Inc. or with any developers who use GitHub for their projects. We do not host any of the videos or images on our servers. All rights belong to their respective owners.
© 2025 bleepingcoder.com -
Contact
By using our site, you acknowledge that you have read and understand our
Cookie Policy and
Privacy Policy.
Most helpful comment
AMD,CMD和CommonJs是es6之前推出的模块化方案。
一、CommonJs是由node推广使用的。
导出module.exports,导入require。
二、AMD是RequireJS在推广过程中对模块定义的规范化
它主要是异步加载模块,模块的加载不影响后面语句的执行;所有依赖这些模块的语句,都定义到一个回调函数中,等依赖模块全部加载完成后,执行回调函数。
三、CMD是SeaJS在推广过程中对模块定义的规范化
它采用就近依赖,同步加载。即在用到依赖的地方,才去加载依赖。