All Projects → tomchentw → Unused Files Webpack Plugin

tomchentw / Unused Files Webpack Plugin

Licence: mit
Glob all files that are not compiled by webpack under webpack's context

Programming Languages

javascript
154013 projects - #8 most used programming language

Projects that are alternatives of or similar to Unused Files Webpack Plugin

Copy Webpack Plugin
Copy files and directories with webpack
Stars: ✭ 2,679 (+1175.71%)
Mutual labels:  webpack, webpack-plugin, glob
Clean Webpack Plugin
By default, this plugin will remove all files inside webpack's output.path directory, as well as all unused webpack assets after every successful rebuild.
Stars: ✭ 1,888 (+799.05%)
Mutual labels:  webpack, webpack-plugin
Webpack Babel Multi Target Plugin
A Webpack plugin that works with Babel to allow differential loading - production deployment of ES2015 builds targeted to modern browsers, with an ES5 fallback for legacy browsers.
Stars: ✭ 150 (-28.57%)
Mutual labels:  webpack, webpack-plugin
Webpack.js.org
Repository for webpack documentation and more!
Stars: ✭ 2,049 (+875.71%)
Mutual labels:  webpack, webpack-plugin
Worker Plugin
👩‍🏭 Adds native Web Worker bundling support to Webpack.
Stars: ✭ 1,840 (+776.19%)
Mutual labels:  webpack, webpack-plugin
Bundle Stats
In-depth bundle analyzer for webpack(bundle size, assets, modules, packages)
Stars: ✭ 144 (-31.43%)
Mutual labels:  webpack, webpack-plugin
Virtual Module Webpack Plugin
Adds the contents of a virtual file to webpack's cached file system without writing it to disk
Stars: ✭ 165 (-21.43%)
Mutual labels:  webpack, webpack-plugin
Webpack Visualizer
Visualize your Webpack bundle
Stars: ✭ 1,664 (+692.38%)
Mutual labels:  webpack, webpack-plugin
React Core Boilerplate
Powerful ASP.NET Core 3 templates with React, true server-side rendering and Docker support
Stars: ✭ 169 (-19.52%)
Mutual labels:  webpack, webpack-plugin
Html Res Webpack Plugin
plugin for generating html in webpack
Stars: ✭ 170 (-19.05%)
Mutual labels:  webpack, webpack-plugin
Workerize Loader
🏗️ Automatically move a module into a Web Worker (Webpack loader)
Stars: ✭ 2,135 (+916.67%)
Mutual labels:  webpack, webpack-plugin
Webpack Require From
Webpack plugin that allows to configure path or URL for fetching dynamic imports
Stars: ✭ 142 (-32.38%)
Mutual labels:  webpack, webpack-plugin
Svg Sprite Loader
Webpack loader for creating SVG sprites.
Stars: ✭ 1,822 (+767.62%)
Mutual labels:  webpack, webpack-plugin
Obsolete Webpack Plugin
🌈 A Webpack plugin generates a browser-side standalone script that detects browser compatibility based on `Browserslist` and prompts website users to upgrade it.
Stars: ✭ 148 (-29.52%)
Mutual labels:  webpack, webpack-plugin
Size Plugin
Track compressed Webpack asset sizes over time.
Stars: ✭ 1,665 (+692.86%)
Mutual labels:  webpack, webpack-plugin
Svg Spritemap Webpack Plugin
SVG spritemap plugin for webpack
Stars: ✭ 160 (-23.81%)
Mutual labels:  webpack, webpack-plugin
Wxapp Webpack Plugin
📦 微信小程序 webpack 插件
Stars: ✭ 185 (-11.9%)
Mutual labels:  webpack, webpack-plugin
Terser Webpack Plugin
Terser Plugin
Stars: ✭ 1,687 (+703.33%)
Mutual labels:  webpack, webpack-plugin
Rollbar Sourcemap Webpack Plugin
A Webpack plugin to upload sourcemaps to Rollbar
Stars: ✭ 127 (-39.52%)
Mutual labels:  webpack, webpack-plugin
Multipage Webpack Plugin
A plugin that makes handling templates and asset distribution for multi-page applications using webpack trivial
Stars: ✭ 168 (-20%)
Mutual labels:  webpack, webpack-plugin

unused-files-webpack-plugin

Glob all files that are not compiled by webpack under webpack's context

Version Travis CI Quality Coverage Dependencies Gitter

Install with npm:

npm i --save-dev unused-files-webpack-plugin

Install with yarn:

yarn add --dev unused-files-webpack-plugin

Usage

webpack.config.babel.js

import UnusedFilesWebpackPlugin from "unused-files-webpack-plugin";

export default {
  plugins: [
    new UnusedFilesWebpackPlugin(options),
  ],
};

webpack.config.js

const { UnusedFilesWebpackPlugin } = require("unused-files-webpack-plugin");

module.exports = {
  plugins: [
    new UnusedFilesWebpackPlugin(options),
  ],
};

Options

new UnusedFilesWebpackPlugin(options)

options.patterns

The (array of) pattern(s) to glob all files within the context.

options.failOnUnused

Emit error instead of warning in webpack compilation result.

  • Default: false
  • Explicitly set it to true to enable this feature

options.globOptions

The options object pass to second parameter of glob-all.

globOptions.ignore

Ignore pattern for glob. Can be a String or an Array of String.

globOptions.cwd

Current working directory for glob. If you don't set explicitly, it defaults to the context specified by your webpack compiler at runtime.

Contributing

devDependency Status

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
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]