mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
Update module.md
This commit is contained in:
parent
f301b5d989
commit
2dbd318fce
@ -205,7 +205,7 @@ function setName(element) {
|
||||
import { lastName as surname } from './profile';
|
||||
```
|
||||
|
||||
`import`后面的`from`指定模块文件的位置,可以是相对路径,也可以是绝对路径,`.js`路径可以省略。如果只是模块名,不带有路径,那么必须有配置文件,告诉 JavaScript 引擎该模块的位置。
|
||||
`import`后面的`from`指定模块文件的位置,可以是相对路径,也可以是绝对路径,`.js`后缀可以省略。如果只是模块名,不带有路径,那么必须有配置文件,告诉 JavaScript 引擎该模块的位置。
|
||||
|
||||
```javascript
|
||||
import {myMethod} from 'util';
|
||||
|
Loading…
x
Reference in New Issue
Block a user