From ab58e41dfd55649cc84bb2492500cd7237146d33 Mon Sep 17 00:00:00 2001 From: Vio Date: Wed, 22 Nov 2023 20:22:32 +0100 Subject: [PATCH] doc: Add output/config guides [skip ci] --- packages/cli/README.md | 13 ++++++++++--- packages/rollup-plugin/README.md | 2 ++ packages/webpack-plugin/README.md | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/cli/README.md b/packages/cli/README.md index f1b4e6e9aa..6986ac955b 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -63,28 +63,35 @@ or yarn add --dev bundle-stats ``` -## Webpack configuration +## Output webpack stats -The CLI is consuming the Webpack stats json. The following [stats options](https://webpack.js.org/configuration/stats) are required: +The CLI is consuming the Webpack stats JSON file. The following [webpack stats options](https://webpack.js.org/configuration/stats) are needed: ```js { stats: { + // required assets: true, chunks: true, modules: true, + // optional builtAt: true, hash: true } } ``` -You can output the stats json file using [webpack-cli](https://www.npmjs.com/package/webpack-cli): +[How to configure webpack for better debugging and monitoring](https://relative-ci.com/documentation/guides/webpack-config) + +You can output the webpack stats JSON file using [webpack-cli](https://www.npmjs.com/package/webpack-cli) `--json` option: ```shell npx webpack --mode production --json artifacts/webpack-stats.json ``` +- [How to output webpack stats JSON file using webpack-cli](https://relative-ci.com/documentation/guides/webpack-stats/webpack-cli) +- [How to output webpack stats JSON file using webpack-stats-plugin](https://relative-ci.com/documentation/guides/webpack-stats/webpack-stats-plugin) + ## Usage ```shell diff --git a/packages/rollup-plugin/README.md b/packages/rollup-plugin/README.md index efdd68a3a5..6edb67e269 100644 --- a/packages/rollup-plugin/README.md +++ b/packages/rollup-plugin/README.md @@ -93,6 +93,8 @@ module.exports = { }; ``` +[How to configure Vite for better debugging and monitoring](https://relative-ci.com/documentation/guides/vite-config) + ### Options - `compare` - use local saved stats for comparison (default `true`). diff --git a/packages/webpack-plugin/README.md b/packages/webpack-plugin/README.md index cd3531a0b3..c43d63a548 100644 --- a/packages/webpack-plugin/README.md +++ b/packages/webpack-plugin/README.md @@ -64,7 +64,6 @@ module.exports = { ] } ``` - ### `BundleStatsWebpackPlugin(options)` - `compare` - use local saved baseline for comparison (default `true`). @@ -88,6 +87,8 @@ module.exports = { } ``` +[How to configure webpack for better debugging and monitoring](https://relative-ci.com/documentation/guides/webpack-config) + ### Use with create-react-app You will need to customize the default webpack config. That can be done by using [react-app-rewired](https://github.com/timarney/react-app-rewired) which is one of create-react-app's custom config solutions. You will also need [customize-cra](https://github.com/arackaf/customize-cra).