webpack-unused-modules-plugin

0.1.0 • Public • Published

webpack-unused-modules-plugin

diff src dir and webpack modules, output the unused src files

install

npm install webpack-unused-modules-plugin --save-dev

how to use

const path = require('path)
const UnusedModulesPlugin = require('webpack-unused-modules-plugin')

plugins: [
  new UnusedModulesPlugin({
    sourceDir: path.join(__dirname, 'src'),
    compilationExclude: compilation => /html-webpack-plugin/.test(compilation.name),
    output: path.join(__dirname, 'tmp/unusedModules.json'),
    exclude: [
      /\.spec\.js$/
    ]
  })
]

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-unused-modules-plugin

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

191 kB

Total Files

13

Last publish

Collaborators

  • zenxds