JSPM

@gatsbylabs/vite-plugin-unused

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 208
  • Score
    100M100P100Q95049F
  • License MIT

Package Exports

  • @gatsbylabs/vite-plugin-unused
  • @gatsbylabs/vite-plugin-unused/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gatsbylabs/vite-plugin-unused) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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;
}