Relative CI

Specialized insights for web bundles

  1. Configure Webpack
  2. Configure @relative-ci.agent
  3. Configure the Continuous Integration Service
  4. Configure Github

1. Configure Webpack

Relative CI is using the JSON output of Webpack stats as a source of data. The following webpack.stats options are required:

{
  stats: {
    assets: true,
    entrypoints: true,
    chunks: true,
    modules: true
  }
}

To have more readable paths in the output, set context property:

{
  stats: {
    context: './src',    assets: true,
    chunks: true,
    entrypoints: true,
    modules: true,
  }
}

Output WebpackStats as a JSON file:

webpack --mode=production --profile --json > artifacts/webpack-stats.json

How to configure Webpack stats on various frameworks:

I am using another framework

2. Configure Relative CI agent

// relativeci.config.js
module.exports = {
  // Allow the agent to pick up the current commit message
  includeCommitMessage: true,
  webpack: {
    // Set relative path to Webpack stats JSON file
    stats: './artifacts/webpack-stats.json'
  }
};

3. Configure the Continuous Integration service

Configure the CI service to run Relative CI agent after each build, in order to send the collected data to the service.

I am using another continuous integration service

4. Configure Github

Install RelativeCI Github application.