Warning Under active development
Generate rollup stats JSON file with a bundle-stats webpack supported structure.
npm install --dev rollup-plugin-webpack-stats
or
yarn add --dev rollup-plugin-webpack-stats
// 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(),
],
}));
fileName
- JSON stats file inside rollup/vite output directory
- Vite - Using plugins
- Rollup - Using plugins
- RelativeCI - Vite configuration for better bundle monitoring