1.0.2 • Published 2 years ago

@gatsbylabs/vite-plugin-unused v1.0.2

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

Vite Plugin Unused

Detect unused files files in a Vite project.

Example vite.config.ts:

import { defineConfig } from "vite";
import { pluginUnused } from "@gatsbylabs/vite-plugin-unused";

export default defineConfig({
  plugins: [pluginUnused({})],
});

An example vite project can be found in the examples/ directory.

Usage

interface Options {
  // glob pattern of files to exclude
  exclude?: string[];
  // glob pattern of file extensions``
  // defaults to  `["*.ts", "*.js", "*.jsx", "*.tsx"]`
  ext?: string[];
  // root folder to look for files, this branches off the root found from your vite config
  // defaults to "src/"
  root?: string;
}