pack-config-diff diff --left=<file> --right=<file> [options]
pack-config-diff --left=<file> --right=<file> [options]
pack-config-diff dump <config-file> [options]
pack-config-diff dump --build=<name> [options]
pack-config-diff dump --all-builds [options]
pack-config-diff dump --list-builds [options]diff is the default command when the first argument is a flag (for example, --left=...).
Path to the first config file (the "before" or "baseline").
Path to the second config file (the "after" or "target").
Both accept .js, .ts, .json, .yaml, or .yml files. See Input Formats.
Output format. Default: detailed.
| Format | Description |
|---|---|
detailed |
Human-readable with descriptions, impact notes, and doc links |
summary |
One-line count: 3 changes: +1 -0 ~2 |
json |
Machine-readable JSON with metadata |
yaml |
Machine-readable YAML with metadata |
markdown |
GitHub-flavored markdown table for PR comments |
See Output Formats for examples of each.
Write output to a file instead of stdout.
pack-config-diff --left=a.json --right=b.json --format=markdown --output=diff-report.mdCompare plugin class instances by their constructor name and property values instead of by object reference. Without this flag, two new MiniCssExtractPlugin({ filename: "style.css" }) instances in different files always show as "changed" even if they have identical options.
See Comparison Modes: Plugin-Aware.
Match module.rules entries by their test pattern instead of by array position. This eliminates false positives when rules are reordered but otherwise identical.
See Comparison Modes: Rule Matching.
Include unchanged values in the output. By default, only differences are shown.
Limit comparison depth. Default: unlimited. Useful for focusing on top-level changes:
pack-config-diff --left=a.json --right=b.json --max-depth=2Comma-separated list of object keys to ignore everywhere in the config:
# Ignore all "devServer" and "stats" keys at any depth
pack-config-diff --left=a.json --right=b.json --ignore-keys=devServer,statsComma-separated list of dot-separated paths to ignore. Supports * wildcards:
# Ignore all plugin entries and the devServer object
pack-config-diff --left=a.json --right=b.json --ignore-paths="plugins.*,devServer"Disable automatic path normalization. By default, the tool detects absolute filesystem paths in configs and converts them to relative paths so that configs from different machines are comparable.
See Comparison Modes: Path Normalization.
Change the separator used in human-readable paths. Default: .
# Use / instead of . for paths like "output/filename"
pack-config-diff --left=a.json --right=b.json --path-separator=/Mode passed as argv.mode when loading JS/TS function-export configs. Default: production.
pack-config-diff --left=webpack.dev.js --right=webpack.prod.js --mode=developmentShow help text and exit.
Path to the config file to load and serialize. Accepts .js, .ts, .json, .yaml, .yml.
Output format. Default: yaml.
| Format | Description |
|---|---|
yaml |
Human-readable YAML with metadata header |
json |
JSON payload { metadata, config } with special-type placeholders |
inspect |
Node.js util.inspect output with metadata and config sections |
Write dump output to a file instead of stdout.
Write split dump outputs to a directory.
Add inline docs for known webpack keys (YAML only).
Set metadata bundler label. Default: webpack.
Mode passed as argv.mode when loading JS/TS function-export configs for dump. Default: production.
Set metadata environment label (header/output metadata only). This does not control argv.mode.
Defaults:
dump <config-file>:productiondump --build/--all-builds:--environmentvalue, otherwisebuild.environment.NODE_ENVwhen present, otherwiseproduction
Set metadata config type label. Default: client.
Root directory used to relativize absolute paths in serialized output. Default: current working directory.
Set an environment variable before loading the config. Repeatable.
Strip noisy plugin internals and compact function sources before serializing.
Security note: dump output without --clean can include sensitive values from plugin/env definitions. Use --clean when sharing artifacts.
Suppress the warning shown when running dump without --clean. Useful for trusted internal automation where warning noise is undesirable.
This does not affect build-matrix environment-label notes.
Suppress the build-matrix note shown when metadata environment falls back to build.environment.NODE_ENV.
This does not suppress the sensitive-output warning from dump without --clean.
Path to build matrix YAML file. Default: config/pack-config-diff-builds.yml.
Security note: this file is treated as trusted input. Relative config: paths inside the matrix must stay within the current working directory; use absolute paths when you intentionally need to load a config outside the project tree. Environment variable expansion in config: may also resolve to absolute paths and is allowed by this trust model.
Dump a specific named build from the build matrix.
Dump all builds from the matrix. Writes files to --save-dir (or default pack-config-diff-exports).
List available builds in the matrix and exit.
| Code | Meaning |
|---|---|
0 |
Success (diff: no changes found; dump: export succeeded; or --help displayed) |
1 |
Differences found (diff) |
2 |
Error (invalid arguments, missing files, etc.) |