import { defineConfig } from "vite";
import { pluginUnused } from "@gatsbylabs/vite-plugin-unused";
export default defineConfig({
plugins: [pluginUnused({})],
});
示例 Vite 项目可见于 examples/ 目录.
使用量
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;
}