Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/content/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ contributors:
- byzyk
- wizardofhogwarts
- EslamHiko
- smelukov
related:
- title: Analyzing Build Statistics
url: https://survivejs.com/webpack/optimizing-build/analyzing-build-statistics/
Expand Down Expand Up @@ -366,3 +367,19 @@ webpack --progress --profile
6ms emitting
```

## Pass CLI arguments to Node.js

To pass arguments directly to Node.js process, you can use the `--node-args` option. All other flags and options will be received by the webpack-cli.

For example, to increase the memory limit of Node.js process to 4 GB

```bash
webpack --node-args="--max-old-space-size=4096"
```

Also, you can pass multiple options to Node.js process

```bash
webpack --node-args="--max-old-space-size=4096" --node-args="-r /path/to/preload/file.js"
```