webpack-unused-check

0.1.2 • Public • Published

webpack-unused-check

Check your frontend code for files/assets that are no longer used.

Uses the output of webpack --json to see which files are actually used in your bundle, and lists files which haven't been required.

forked from https://github.com/latentflip/webpack-unused and add nested modules handling in webpack stats file.

Usage:

# install webpack-unused-check
npm install -g webpack-unused-check
# or
npx webpack-unused-check

# run webpack using your normal webpack config etc
# with the --json switch to output the stats.json
# unused files in the cwd will be listed
npm run build 
webpack-unused-check --stats dist/stats.json --output dist/unused.txt

# if your source code is in a directory, like src/ pass that as a flag:
webpack-unused-check -s src

# or auto delete unused files
webpack-unused-check -s src --stats dist/stats.json --output dist/unused.txt --suffix js --autodelete

Related

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-unused-check

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

5.43 kB

Total Files

4

Last publish

Collaborators

  • gibobilee