0.1.1 • Published 1 year ago
vite-plugin-lib-reporter v0.1.1
vite-plugin-lib-reporter
Add in your CI a limit check of one of these stats:

Installation
pnpm add vite-plugin-lib-reporter -DConfiguration
Add in your vite.config.ts:
import { sveltekit } from "@sveltejs/kit/vite";
import { libReporter } from "vite-plugin-lib-reporter"; // 👈 1/ add import
import type { UserConfig } from "vite";
const config: UserConfig = {
plugins: [
sveltekit(),
/* */
/* 2/ Config 👇 */
/* */
libReporter([
{
name: 'My-Super-Lib-To-Check',
includes: ['My-Super-Lib-To-Check'],
// excludes: ["svelte"], // optional
// always_log_report: false,
limit: {
treeshaked: {
compressed_max: 7,
},
},
},
]),
],
};
export default config;- Either your build will pass ✅
- Either it will fail because you are hitting a limit you configured. ❌
Visualize your report?
Just run 👇
npm run libReport