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

esm: add experimental .json support to loader #43

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
doc: esm flags, package scope and file extensions rules
  • Loading branch information
GeoffreyBooth authored and MylesBorins committed Mar 11, 2019
commit 97bfb31abc0f4b158a51b73eca90a32b9d661c93
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