@@ -919,29 +919,30 @@ flows within the application. As such, it is presently recommended to be sure
919
919
your application behaviour is unaffected by this change before using it in
920
920
production.
921
921
922
- ### ` --experimental-config-file `
922
+ ### ` --experimental-config-file=config `
923
923
924
924
<!-- YAML
925
925
added: REPLACEME
926
926
-->
927
927
928
928
> Stability: 1.0 - Early development
929
929
930
- Use this flag to specify a configuration file that will be loaded and parsed
931
- before the application starts .
930
+ If present, Node.js will look for a
931
+ configuration file at the specified path .
932
932
Node.js will read the configuration file and apply the settings.
933
933
The configuration file should be a JSON file
934
934
with the following structure:
935
935
936
+ > \[ !NOTE]
937
+ > Replace ` vX.Y.Z ` in the ` $schema ` with the version of Node.js you are using.
938
+
936
939
``` json
937
940
{
938
- "$schema" : " https://nodejs.org/dist/REPLACEME /docs/node_config_json_schema .json" ,
941
+ "$schema" : " https://nodejs.org/dist/vX.Y.Z /docs/node-config-schema .json" ,
939
942
"nodeOptions" : {
940
- "experimental-transform-types" : true ,
941
943
"import" : [
942
- " amaro/transform "
944
+ " amaro/strip "
943
945
],
944
- "disable-warning" : " ExperimentalWarning" ,
945
946
"watch-path" : " src" ,
946
947
"watch-preserve-output" : true
947
948
}
@@ -952,7 +953,7 @@ In the `nodeOptions` field, only flags that are allowed in [`NODE_OPTIONS`][] ar
952
953
No-op flags are not supported.
953
954
Not all V8 flags are currently supported.
954
955
955
- It is possible to use the [ official JSON schema] ( ../node_config_json_schema .json )
956
+ It is possible to use the [ official JSON schema] ( ../node-config-schema .json )
956
957
to validate the configuration file, which may vary depending on the Node.js version.
957
958
Each key in the configuration file corresponds to a flag that can be passed
958
959
as a command-line argument. The value of the key is the value that would be
@@ -962,7 +963,7 @@ For example, the configuration file above is equivalent to
962
963
the following command-line arguments:
963
964
964
965
``` bash
965
- node --experimental-transform-types -- import amaro/transform --disable-warning=ExperimentalWarning --watch-path=src --watch-preserve-output
966
+ node --import amaro/strip --watch-path=src --watch-preserve-output
966
967
```
967
968
968
969
The priority in configuration is as follows:
@@ -984,6 +985,18 @@ unknown keys or keys that cannot used in `NODE_OPTIONS`.
984
985
Node.js will not sanitize or perform validation on the user-provided configuration,
985
986
so ** NEVER** use untrusted configuration files.
986
987
988
+ ### ` --experimental-default-config-file `
989
+
990
+ <!-- YAML
991
+ added: REPLACEME
992
+ -->
993
+
994
+ > Stability: 1.0 - Early development
995
+
996
+ If the ` --experimental-default-config-file ` flag is present, Node.js will look for a
997
+ ` node.config.json ` file in the current working directory and load it as a
998
+ as configuration file.
999
+
987
1000
### ` --experimental-eventsource `
988
1001
989
1002
<!-- YAML
0 commit comments