Skip to content

wgbx/unused-assets-webpack-plugin

Repository files navigation

unused-assets-webpack-plugin

Find whether there are unused assets in the project

简体中文

Configuration Options

Configuration Option Name Required Meaning Default Value Type
path No The resource path to search ./src string
output No The output file path ./unused-files.json string
exclude No The file types to exclude [] string[]
npm install unused-assets-webpack-plugin -D
// or
pnpm add unused-assets-webpack-plugin -D

Usage

  • vue.config.js
const UnusedAssetsWebpackPlugin = require('unused-assets-webpack-plugin')

module.exports = {
  configureWebpack: {
    plugins: [new UnusedAssetsWebpackPlugin()]
  }
}