npm install --dev @relative-ci/agent
or
yarn add --dev @relative-ci/agent
npm install --dev rollup-plugin-webpack-stats
or
yarn add --dev rollup-plugin-webpack-stats
Output Vite stats JSON with a webpack stats structure supported by @relative-ci/agent
// vite.config.js
import { defineConfig } from 'vite';
import { webpackStats } from 'rollup-plugin-webpack-stats';
export default defineConfig((env) => ({
plugins: [
// Output webpack-stats.json file
webpackStats(),
],
}));
# .github/workflow/build.yml
name: Build
on: push
jobs:
build:
steps:
- name: Build application & bundle stats
run: npm run build
- name: Send bundle stats and build information to RelativeCI
uses: relative-ci/agent-action@v2
with:
key: ${{ secrets.RELATIVE_CI_KEY }}
webpackStatsFile: ./webpack-stats.json