1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

docs(module-loader): fix typo

This commit is contained in:
ruanyf 2020-08-19 21:03:52 +08:00
parent 266199c2d2
commit 09accf90d9

View File

@ -504,7 +504,7 @@ cjs === 'cjs'; // true
上面代码中ES6 模块通过`module.createRequire()`方法可以加载 CommonJS 模块。但是,这种写法等于将 ES6 和 CommonJS 混在一起了,所以不建议使用。 上面代码中ES6 模块通过`module.createRequire()`方法可以加载 CommonJS 模块。但是,这种写法等于将 ES6 和 CommonJS 混在一起了,所以不建议使用。
## 同时支持两种格式的模块 ### 同时支持两种格式的模块
一个模块同时要支持 CommonJS 和 ES6 两种格式,也很容易。 一个模块同时要支持 CommonJS 和 ES6 两种格式,也很容易。