Skip to content
Open
Show file tree
Hide file tree
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
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,32 @@ This exports development and production configurations for both client and serve

For more options and usage examples, see the [Troubleshooting Guide](./docs/troubleshooting.md#exporting-webpack--rspack-configuration).

#### Comparing Configurations

Once you've exported configurations, you can compare them to identify differences:

```bash
# Compare development vs production configs
bin/diff-bundler-config \
--left=shakapacker-config-exports/webpack-development-client.yaml \
--right=shakapacker-config-exports/webpack-production-client.yaml

# Get a quick summary
bin/diff-bundler-config \
--left=config1.yaml \
--right=config2.yaml \
--format=summary
```

The diff tool supports multiple output formats (detailed, summary, json, yaml) and advanced options like ignoring specific paths or keys. Perfect for:

- Understanding configuration changes between environments
- Debugging unexpected behavior differences
- Code reviews involving configuration changes
- Documenting configuration decisions

For complete documentation, see the [Configuration Diff Guide](./docs/config-diff.md).

### Integrations

Shakapacker out of the box supports JS and static assets (fonts, images etc.) compilation. To enable support for CoffeeScript or TypeScript install relevant packages:
Expand Down
11 changes: 11 additions & 0 deletions bin/diff-bundler-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node

// Minimal shim - all logic is in the TypeScript module
const { run } = require("shakapacker/configDiffer")

run(process.argv.slice(2))
.then((exitCode) => process.exit(exitCode))
.catch((error) => {
console.error(error.message)
process.exit(1)
})
Loading
Loading