diff --git a/doc/api/cli.md b/doc/api/cli.md index 9c5af91ae13f915..d3839e4b923b510 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -911,6 +911,46 @@ added: v23.6.0 Enable experimental import support for `.node` addons. +### `--experimental-config-file` + + + +> Stability: 1.0 - Early development + +Use this flag to specify a configuration file that will be loaded and parsed +before the application starts. +Node.js will read the configuration file and apply the settings. +The configuration file should be a JSON file +with the following structure: + +```json +{ + "experimental_transform_types": true +} +``` + +The priority in configuration is as follows: + +* NODE\_OPTIONS and command-line options +* Config file +* Dotenv NODE\_OPTIONS + +If multiple keys are present in the configuration file, +the last one will override the previous ones. +Unknown keys will be ignored. + +It possible to use the official json schema to validate the configuration file, +which may vary depending on the Node.js version. + +```json +{ + "$schema": "https://nodejs.org/dist/REPLACEME/node_config_json_schema.json", + "experimental_transform_types": true +} +``` + ### `--experimental-eventsource`