icon-cookie
The website uses cookies to optimize your user experience. Using this website grants us the permission to collect certain information essential to the provision of our services to you, but you may change the cookie settings within your browser any time you wish. Learn more
I agree
blank_error__heading
blank_error__body
Text direction?

快速了解JavaScript模块化

Measure
Measure
Related Notes
Get a free MyMarkup account to save this article and view it later on any device.
Create account

End User License Agreement

Summary | 7 Annotations
CommonJS的核心思想就是通过 require 方法来同步加载所要依赖的其他模块,然后通过 exports 或者 module.exports 来导出需要暴露的接口
2020/06/04 15:54
define来定义一个模块
2020/06/04 15:55
require来加载一个模块
2020/06/04 15:55
ES6的模块化方案是真正的规范
2020/06/04 15:56
import 关键字引入模块
2020/06/04 15:56
export 关键字导出模块
2020/06/04 15:56
babel将不被支持的import编译为当前受到广泛支持的 require
2020/06/04 15:56