Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for writing multiple reports at once #442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 5, 2021

  1. Add support for writing multiple reports at once

    We are adding support for a new option called `reports` which accepts an
    array of reports:
    
    ```json
    new BundleAnalyzerPlugin({
      analyzerMode: "static",
      reports: [
        { type: "json", filename: "my-report.json" },
        { type: "html", filename: "my-report.html" },
      ],
    });
    ```
    
    Users of the `analyzerMode` in `json` should migrate from:
    
    ```js
    new BundleAnalyzerPlugin({
      analyzerMode: "json",
      reportFilename: "my-report.json",
    });
    ```
    
    to
    
    ```js
    new BundleAnalyzerPlugin({
      analyzerMode: "static",
      reports: [{ type: "json", filename: "my-report.json" }],
    });
    ```
    
    Users of the `analyzerMode` with `html` should migrate from:
    
    ```js
    new BundleAnalyzerPlugin({
      analyzerMode: "static",
      reportFileName: "my-report.html",
    });
    ```
    
    to
    
    ```js
    new BundleAnalyzerPlugin({
      analyzerMode: "static",
      reports: [{ type: "html", filename: "my-report.html" }],
    });
    ```
    
    In order to help with the migration, these config changes will pe
    printed with a logger warning, while we internally being rewritten to
    the new format so that this isn't a breaking change.
    leipert committed May 5, 2021
    Configuration menu
    Copy the full SHA
    6ed44d2 View commit details
    Browse the repository at this point in the history