# unused-files-globby-webpack-plugin

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

Latest version **1.0.5** (published 2022-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install unused-files-globby-webpack-plugin
pnpm add unused-files-globby-webpack-plugin
yarn add unused-files-globby-webpack-plugin
bun add unused-files-globby-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-01-12 |
| First published | 2021-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 12.2 |
| Dependencies | 3 |
| Unpacked size | 41.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | futpib |
| Maintainers | futpib |
| Keywords | unused, redundancy, files, require, webpack, webpack-plugin |

## Links

- npm: https://www.npmjs.com/package/unused-files-globby-webpack-plugin
- Homepage: https://github.com/futpib/unused-files-globby-webpack-plugin
- npm.io page: https://npm.io/package/unused-files-globby-webpack-plugin

## Dependencies (3)

- [globby](https://npm.io/package/globby.md) ^11.0.4
- [outdent](https://npm.io/package/outdent.md) ^0.8.0
- [deep-extend](https://npm.io/package/deep-extend.md) ^0.6.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2022-01-12
- 1.0.4 — 2021-07-15
- 1.0.3 — 2021-07-15
- 1.0.2 — 2021-07-15

## README

# unused-files-globby-webpack-plugin
> Glob all files that are not compiled by webpack under webpack's context

Install with npm:

```bash
npm i --save-dev unused-files-globby-webpack-plugin
```

Install with yarn:

```bash
yarn add --dev unused-files-globby-webpack-plugin
```

## Example usage

### `webpack.config.js`

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

module.exports = {
  plugins: [
    new UnusedFilesWebpackPlugin({
      failOnUnused: true,
      globby: {
        patterns: [
          'src/**/*',
          'assets/**/*',
        ],
      },
    }),
  ],
};
```


## Options

```js
new UnusedFilesWebpackPlugin(options)
```

### options.failOnUnused

Emit _error_ instead of _warning_ in webpack compilation result.

* Default: `false`
* Explicitly set it to `true` to enable this feature

### options.globby.patterns

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

* Default: `'**/*.*'`
* Directly passed to [`globby`](https://github.com/sindresorhus/globby#globbypatterns-options)

### options.globby.options

The options object pass to second parameter of `globby`.

* Default: `{ gitignore: true }`
* Directly passed to [`globby`](https://github.com/sindresorhus/globby#globbypatterns-options)

---
_Source: https://npm.io/package/unused-files-globby-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
