vite-plugin-deadcode
v1.0.29
Published
Searching deadcode for vue-project.
Downloads
85
Readme
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
.