1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-29 13:52:22 +00:00

docs(module-loader): fix typo

This commit is contained in:
ruanyf 2020-08-20 20:26:45 +08:00
parent a841acdca5
commit 2613635b77

View File

@ -484,7 +484,7 @@ import { method } from 'commonjs-package';
```javascript
import packageMain from 'commonjs-package';
const { method } = packageMain;:w
const { method } = packageMain;
```
还有一种变通的加载方法,就是使用 Node.js 内置的`module.createRequire()`方法。