vite-plugin-shit
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

vite-plugin-shit

To prevent shit from your bundle

Screenshot

Shit score

Let's define moment's shit score as 10, and moment appear 10 times when generating the bundle. And your result shit score is 10 * 10 = 100.

If your threshold is 100, the plugin will terminate building and print 💩 and where it is from.

How to use

npm install --save-dev vite-plugin-shit
// vite.config.ts
import { defineConfig } from 'vite';
import shit from 'vite-plugin-shit';

export default defineConfig({
  plugins: [
    shit({
      // when reach this much shit, abort building
      threshold: 100,
      // use recommended shit rules
      recommended: true,
      // define custom shit rules
      rules: {
        moment: 50,
        lodash: 50,
      },
    }),
  ],
});

Package Sidebar

Install

npm i vite-plugin-shit

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

62.4 kB

Total Files

7

Last publish

Collaborators

  • guoyunhe