All Projects → latentflip → Webpack Unused

latentflip / Webpack Unused

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

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Webpack Unused

Frontend Boilerplate
An ES20XX starter with common frontend tasks using Webpack 4 as module bundler and npm scripts as task runner.
Stars: ✭ 224 (+63.5%)
Mutual labels:  webpack, frontend
Create React App Typescript
DEPRECATED: Create React apps using typescript with no build configuration.
Stars: ✭ 3,759 (+2643.8%)
Mutual labels:  webpack, frontend
Frontend Boilerplates
Collection of Boilerplates with ES6, Vue, React, Nuxt, TypeScript, SCSS, Nodejs. Using good practices and file structures to inspire your real projects.
Stars: ✭ 269 (+96.35%)
Mutual labels:  webpack, frontend
Webpack Libs Optimizations
Using a library in your webpack project? Here’s how to optimize it
Stars: ✭ 3,187 (+2226.28%)
Mutual labels:  webpack, frontend
Ostap
CLI tool that fast checks if your bundle contains multiple versions of the same package, only by looking in package.json.
Stars: ✭ 117 (-14.6%)
Mutual labels:  webpack, frontend
Webpack Book
From apprentice to master (CC BY-NC-ND)
Stars: ✭ 2,372 (+1631.39%)
Mutual labels:  webpack, frontend
Multipages Generator
🥇 generator for multiple pages webpack application
Stars: ✭ 354 (+158.39%)
Mutual labels:  webpack, frontend
Baumeister
👷 The aim of this project is to help you to build your things. From Bootstrap themes over static websites to single page applications.
Stars: ✭ 171 (+24.82%)
Mutual labels:  webpack, frontend
Jetpack
🚀 Jetpack – Webpack made more convenient.
Stars: ✭ 1,326 (+867.88%)
Mutual labels:  webpack, frontend
Webpacker
Use Webpack to manage app-like JavaScript modules in Rails
Stars: ✭ 5,282 (+3755.47%)
Mutual labels:  webpack, frontend
Annotated Webpack Config
This is the companion github repo for the "An Annotated webpack 4 Config for Frontend Web Development" article.
Stars: ✭ 425 (+210.22%)
Mutual labels:  webpack, frontend
Fe Interview
😃 每日一道经典前端面试题,一起共同成长。
Stars: ✭ 134 (-2.19%)
Mutual labels:  webpack, frontend
Webpack Starter
✨ A lightweight foundation for your next webpack based frontend project.
Stars: ✭ 1,745 (+1173.72%)
Mutual labels:  webpack, frontend
Spring Boot Vuejs
Example project showing how to build a Spring Boot App providing a GUI with Vue.js
Stars: ✭ 1,818 (+1227.01%)
Mutual labels:  webpack, frontend
Blog
阿翔的个人技术博客,博文写在 Issues 里,如有收获请 star 鼓励~
Stars: ✭ 135 (-1.46%)
Mutual labels:  frontend
Tensor
Tensor - Comprehensive web-based automation framework and Centralized infrastructure management platform
Stars: ✭ 136 (-0.73%)
Mutual labels:  frontend
Portfolio Generator
JS framework to dynamically generate a portfolio site from a JSON file
Stars: ✭ 135 (-1.46%)
Mutual labels:  frontend
Monitaure
🔔 A server uptime monitoring progressive web application - NO LONGER MAINTAINED
Stars: ✭ 135 (-1.46%)
Mutual labels:  webpack
Wp Tailwind
A WordPress starter theme that utilizes Tailwind + PurgeCSS.
Stars: ✭ 135 (-1.46%)
Mutual labels:  webpack
Preact Minimal
🚀 Minimal preact structure
Stars: ✭ 136 (-0.73%)
Mutual labels:  webpack

webpack-unused

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.

Usage:

# install webpack-unused
npm install -g webpack-unused

# run webpack using your normal webpack config etc
# with the --json switch to output the stats.json, and pipe to webpack-unused
# unused files in the cwd will be listed
webpack --json | webpack-unused

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

Notes/Caveats:

  • this doesn't check for any unused npm modules etc that you have installed (node_modules is ignored)
  • webpack-unused will detect non-js files that are required via loaders etc, however any requires that happen outside of webpack's knowledge may be incorrectly reported as unused, for example:
    • css-preprocessor imports, for example less's @import happens outside the webpack flow, so files which are only required via @import will report as unused, even if they are
  • it looks like currently files that would appear in your output from using webpack's NormalModuleReplacementPlugin don't appear in webpack's --json output, and so will be incorrectly reported as unused, while the original may be incorrectly reported as used. issue #1
  • ideally, you'll have all your frontend code in a src/ directory or similar so that you can use the -s flag, if not, any non-frontend code in cwd will be reported as unused

Related

Contributing, etc

This is just a first stab, and I'm publishing it because I constantly look for/rewrite code to achieve this. PRs/Suggestions for improvements very welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].