Skip to content

Tyrion1024/vite-plugin-deadcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-plugin-deadcode

Searching deadcode for vue-project.

First of all, your project must support command $vite build

Install

$npm install vite-plugin-deadcode --save-dev
# or
$yarn add vite-plugin-deadcode -D

Usage

// vite.config.js
import { defineConfig } from 'vite'
import deadcodePlugins from 'vite-plugin-deadcode'

export default defineConfig({
  plugins: [deadcodePlugins({
    inputDir: 'src',  // serarch path, default: src
    outDir: 'dist'  // the path where deadcode output, default: dist
  })]
})
// package.json
{
  "scripts": {
    "vite:deadcode": "DEAD_CODE=true vite build"
  }
}

Then $npm run vite:deadcode, When the process finish,

you'll see file ${outDir}/deadcode.html.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published