Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: correct import statement
JSON file can be imported now
  • Loading branch information
himself65 committed Jul 28, 2019
commit 849ca9d4043c235f13d42d9299cf97bd298c088f
5 changes: 3 additions & 2 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,9 @@ To include an ES module into CommonJS, use [`import()`][].

### <code>import</code> statements

An `import` statement can reference either ES module or CommonJS JavaScript.
Other file types such as JSON and Native modules are not supported. For those,
An `import` statement can reference either ES module or CommonJS JavaScript
or JSON.
Other file types such as Native modules are not supported. For those,
use [`module.createRequire()`][].

`import` statements are permitted only in ES modules. For similar functionality
Expand Down