vite-plugin-deadcode

1.0.29 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-deadcode

Weekly Downloads

82

Version

1.0.29

License

ISC

Unpacked Size

1.93 MB

Total Files

4

Last publish

Collaborators

  • tyrion1024