Skip to content

Commit

Permalink
doc: clarify required flag for extensionless esm
Browse files Browse the repository at this point in the history
  • Loading branch information
azz committed Nov 26, 2019
1 parent 00e2276 commit e622474
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ if the nearest parent `package.json` contains `"type": "module"`.
```js
// my-app.js, part of the same example as above
import './startup.js'; // Loaded as ES module because of package.json

// Extensionless. Requires 'node --es-module-specifier-resolution=node'
import './startup'; // Loaded as ES module because of package.json
```

Package authors should include the `"type"` field, even in packages where all
Expand Down

0 comments on commit e622474

Please sign in to comment.