Vite, Rollup, and Rolldown agent plugin

8 days ago

@relative-ci/rollup-plugin is now available for Vite, Rollup, and Rolldown projects. It provides a single-step integration that collects bundle stats during the build and sends them together with CI metadata to RelativeCI.

For open source projects or setups that rely on GitHub forks or require stricter secret isolation, we recommend the RelativeCI GitHub Action workflow.

To set up @relative-ci/rollup-plugin, install the package:

npm install --save-dev @relative-ci/rollup-plugin

yarn add --dev @relative-ci/rollup-plugin

pnpm add -D @relative-ci/rollup-plugin

Then add the plugin to your Vite, Rollup, or Rolldown config. The plugin should run last so it can collect the final build output and upload the generated stats with the detected CI context.

vite.config.mjs
import { defineConfig } from 'vite';
import relativeCiAgent from '@relative-ci/rollup-plugin';
export default defineConfig({
// ...your Vite config
plugins: [
// ...your other plugins
// Add the agent plugin last
relativeCiAgent(),
],
});

By default, the plugin is configured to collect and send the CI metadata when a CI service is detected.

Read more about @relative-ci/rollup-plugin configuration options, required environment variables, and debugging

Latest package updates

Read more

Follow us on Twitter, subscribe to our mailing list or subscribe to our feed to stay up to date with RelativeCI updates.