@@ -43,29 +43,29 @@ loaded as an ES module.
4343node --experimental-modules my-app.mjs
4444```
4545
46- ### <code >--type=module</code > flag
46+ ### <code >--entry- type=module</code > flag
4747
4848Files ending with ` .js ` or ` .mjs ` , or lacking any extension,
49- will be loaded as ES modules when the ` --type=module ` flag is set.
49+ will be loaded as ES modules when the ` --entry- type=module ` flag is set.
5050
5151``` sh
52- node --experimental-modules --type=module my-app.js
52+ node --experimental-modules --entry- type=module my-app.js
5353```
5454
55- For completeness there is also ` --type=commonjs ` , for explicitly running a ` .js `
56- file as CommonJS. This is the default behavior if ` --type ` is
55+ For completeness there is also ` --entry- type=commonjs ` , for explicitly running
56+ a ` .js ` file as CommonJS. This is the default behavior if ` --entry -type ` is
5757unspecified.
5858
59- The ` --type=module ` flag can also be used to configure Node.js to treat
59+ The ` --entry- type=module ` flag can also be used to configure Node.js to treat
6060as an ES module input sent in via ` --eval ` or ` --print ` (or ` -e ` or ` -p ` ) or
6161piped to Node.js via ` STDIN ` .
6262
6363``` sh
64- node --experimental-modules --type=module --eval \
64+ node --experimental-modules --entry- type=module --eval \
6565 " import { sep } from 'path'; console.log(sep);"
6666
6767echo " import { sep } from 'path'; console.log(sep);" | \
68- node --experimental-modules --type=module
68+ node --experimental-modules --entry- type=module
6969```
7070
7171### <code >package.json</code > <code >"type"</code > field
@@ -420,8 +420,8 @@ to work.
420420
421421<!-- eslint-skip -->
422422` ` ` bash
423- node -- experimental- modules -- type= module index .js # fails
424- node -- experimental- modules -- type= module -- experimental- json- modules index .js # works
423+ node -- experimental- modules -- entry - type= module index .js # fails
424+ node -- experimental- modules -- entry - type= module -- experimental- json- modules index .js # works
425425` ` `
426426
427427## Experimental Loader hooks
@@ -576,7 +576,7 @@ of these top-level routines.
576576
577577_isMain_ is **true** when resolving the Node.js application entry point.
578578
579- When using the ` -- type` flag, it overrides the ESM_FORMAT result while
579+ When using the ` -- entry - type` flag, it overrides the ESM_FORMAT result while
580580providing errors in the case of explicit conflicts.
581581
582582<details>
0 commit comments