Skip to content

relative-ci/rollup-plugin-webpack-stats

Repository files navigation

rollup-plugin-webpack-stats

Warning Under active development

ci Socket Badge

Generate rollup stats JSON file with a bundle-stats webpack supported structure.

Install

npm install --dev rollup-plugin-webpack-stats

or

yarn add --dev rollup-plugin-webpack-stats

Configure

// rollup.config.js
const { webpackStats } = require('rollup-plugin-webpack-stats');

module.exports = {
  plugins: [
    // add it as the last plugin
    webpackStats(),
  ],
};
// 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(),
  ],
}));

Options

  • fileName - JSON stats file inside rollup/vite output directory

Resources