Skip to content

Load NODE_OPTIONS from a file #37409

@mistic

Description

@mistic

Is your feature request related to a problem? Please describe.
Currently there are useful node options(https://nodejs.org/api/cli.html#cli_node_options_options) I would like to be able to easily specify project wide like --max-old-space-size and --preserve-symlinks but there is not really a way to do it through the repository only through NODE_OPTIONS or by specifying it by hand every time an npm script is defined which is not convenient for large sized monorepos.

Describe the solution you'd like
I would like to be able to specify those options in a file that, if present, node will try to read the options from it. The name could be for example .node_options. Each option will be specified per line and will override every other option specified through NODE_OPTIONS env var or directly passed when invoking the node binary.

Describe alternatives you've considered
Right now that is non easy way to accomplish the use case that I have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliIssues and PRs related to the Node.js command line interface.feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions