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

Commit

Permalink
Warn about --type with shebang
Browse files Browse the repository at this point in the history
Follow-up to #35
  • Loading branch information
Jan Olaf Krems authored Feb 16, 2019
1 parent 4514848 commit 744065f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,10 @@ Track heap object allocations for heap snapshots.
When using `--experimental-modules`, this informs the module resolution type
to interpret the top-level entry into Node.js.

Works with stdin, `--eval`, `--print` as well as standard execution.
Works with stdin, `--eval`, `--print` as well as standard execution
when envoking `node` explicitly.
Does not work reliably when running via shebang (`#!/usr/bin/env node`)
since arguments inside of the shebang aren't well supported across platforms.

Valid values are `"commonjs"` and `"module"`, where the default is to infer
from the file extension and package type boundary.
Expand Down

0 comments on commit 744065f

Please sign in to comment.