Skip to content

Commit e644088

Browse files
SirR4Ttargos
authored andcommittedSep 3, 2018
doc: add doc for --loader option
PR-URL: #22104 Fixes: #21230 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: John-David Dalton <[email protected]>
1 parent 4638ce6 commit e644088

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
 

‎doc/api/cli.md

+8
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
132132
and profile Node.js instances. The tools attach to Node.js instances via a
133133
tcp port and communicate using the [Chrome DevTools Protocol][].
134134

135+
### `--loader=file`
136+
<!--
137+
added: v9.0.0
138+
-->
139+
140+
Specify the `file` of the custom [experimental ECMAScript Module][] loader.
141+
135142
### `--napi-modules`
136143
<!-- YAML
137144
added: v7.10.0
@@ -686,4 +693,5 @@ greater than `4` (its current default value). For more information, see the
686693
[REPL]: repl.html
687694
[debugger]: debugger.html
688695
[emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor
696+
[experimental ECMAScript Module]: esm.html#esm_loader_hooks
689697
[libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html

‎doc/node.1

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ Default is
124124
V8 Inspector integration allows attaching Chrome DevTools and IDEs to Node.js instances for debugging and profiling.
125125
It uses the Chrome DevTools Protocol.
126126
.
127+
.It Fl -loader Ns = Ns Ar file
128+
Specify the
129+
.Ar file
130+
as a custom loader, to load
131+
.Fl -experimental-modules .
132+
.
127133
.It Fl -napi-modules
128134
This option is a no-op.
129135
It is kept for compatibility.

‎src/node.cc

+3
Original file line numberDiff line numberDiff line change
@@ -2633,6 +2633,9 @@ static void PrintHelp() {
26332633
" --inspect[=[host:]port] activate inspector on host:port\n"
26342634
" (default: 127.0.0.1:9229)\n"
26352635
#endif // HAVE_INSPECTOR
2636+
" --loader=file (with --experimental-modules) use the \n"
2637+
" specified file as a custom loader\n"
2638+
" for ECMAScript Modules \n"
26362639
" --napi-modules load N-API modules (no-op - option\n"
26372640
" kept for compatibility)\n"
26382641
" --no-deprecation silence deprecation warnings\n"

0 commit comments

Comments
 (0)
Please sign in to comment.