@gatsbylabs/vite-plugin-unused
v1.0.2
Published
Detect unused files files in a Vite project.
Downloads
247
Readme
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;
}