官术网_书友最值得收藏!

File modules

The CommonJS and ES2015 modules we've just looked at are what the Node.js documentation describes as a file module. Such modules are contained within a single file, whose filename ends with .js, .mjs, .json, or .node. The latter are compiled from C or C++ source code, or even other languages such as Rust, while the former are of course written in JavaScript or JSON.

We've already looked at several examples of using these modules, as well as the difference between the CommonJS format traditionally used in Node.js, and the new ES2015 modules that are now supported.

主站蜘蛛池模板: 广州市| 滨州市| 汨罗市| 策勒县| 富裕县| 银川市| 德江县| 漳平市| 库尔勒市| 崇阳县| 贵德县| 广昌县| 渭南市| 广汉市| 灵寿县| 德州市| 东至县| 都兰县| 西吉县| 辛集市| 东台市| 扶绥县| 林周县| 泰来县| 渑池县| 屏东县| 长宁区| 漠河县| 穆棱市| 东辽县| 合阳县| 库尔勒市| 吉木乃县| 永清县| 金溪县| 旌德县| 开封县| 大余县| 平江县| 安丘市| 诏安县|