Add in your CI a `limit` check of one of these stats:
Add in your CI a limit
check of one of these stats:
pnpm add vite-plugin-lib-reporter -D
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;
Just run 👇
npm run libReport