Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
doc: esm flags, package scope and file extensions rules
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth authored and nodejs-ci committed Mar 13, 2019
1 parent a20f5df commit 1427dfb
Show file tree
Hide file tree
Showing 2 changed files with 417 additions and 164 deletions.
10 changes: 5 additions & 5 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,13 @@ Track heap object allocations for heap snapshots.

### `-m`, `--type=type`

When using `--experimental-modules`, this informs the module resolution type
to interpret the top-level entry into Node.js.
Used with `--experimental-modules`, this configures Node.js to interpret the
initial entry point as CommonJS or as an ES module.

Works with stdin, `--eval`, `--print` as well as standard execution.
Valid values are `"commonjs"` and `"module"`. The default is to infer from
the file extension and the `"type"` field in the nearest parent `package.json`.

Valid values are `"commonjs"` and `"module"`, where the default is to infer
from the file extension and package type boundary.
Works for executing a file as well as `--eval`, `--print`, `STDIN`.

`-m` is an alias for `--type=module`.

Expand Down
Loading

0 comments on commit 1427dfb

Please sign in to comment.