1.0.1 • Published 2 years ago

vite-plugin-shit v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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,
      },
    }),
  ],
});
1.0.1

2 years ago

1.0.0

2 years ago