doc: add doc for --loader option

PR-URL: https://github.com/nodejs/node/pull/22104
Fixes: https://github.com/nodejs/node/issues/21230
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
pull/22354/merge
Sarat Addepalli 2018-08-03 14:54:14 +05:30 committed by Vse Mozhet Byt
parent 7cbbb27c07
commit 9d6619efea
3 changed files with 17 additions and 0 deletions

View File

@ -132,6 +132,13 @@ V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
and profile Node.js instances. The tools attach to Node.js instances via a
tcp port and communicate using the [Chrome DevTools Protocol][].
### `--loader=file`
<!--
added: v9.0.0
-->
Specify the `file` of the custom [experimental ECMAScript Module][] loader.
### `--napi-modules`
<!-- YAML
added: v7.10.0
@ -686,4 +693,5 @@ greater than `4` (its current default value). For more information, see the
[REPL]: repl.html
[debugger]: debugger.html
[emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor
[experimental ECMAScript Module]: esm.html#esm_loader_hooks
[libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html

View File

@ -124,6 +124,12 @@ Default is
V8 Inspector integration allows attaching Chrome DevTools and IDEs to Node.js instances for debugging and profiling.
It uses the Chrome DevTools Protocol.
.
.It Fl -loader Ns = Ns Ar file
Specify the
.Ar file
as a custom loader, to load
.Fl -experimental-modules .
.
.It Fl -napi-modules
This option is a no-op.
It is kept for compatibility.

View File

@ -2632,6 +2632,9 @@ static void PrintHelp() {
" --inspect[=[host:]port] activate inspector on host:port\n"
" (default: 127.0.0.1:9229)\n"
#endif // HAVE_INSPECTOR
" --loader=file (with --experimental-modules) use the \n"
" specified file as a custom loader\n"
" for ECMAScript Modules \n"
" --napi-modules load N-API modules (no-op - option\n"
" kept for compatibility)\n"
" --no-deprecation silence deprecation warnings\n"