npm.io
2.4.5 • Published 3 years ago

@types/unused-webpack-plugin

Licence
MIT
Version
2.4.5
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.5K

Installation

npm install --save @types/unused-webpack-plugin

Summary

This package contains type definitions for unused-webpack-plugin (https://github.com/MatthieuLemoine/unused-webpack-plugin#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unused-webpack-plugin.

index.d.ts

import { Compiler, WebpackPluginInstance } from "webpack";

export = UnusedWebpackPlugin;

declare namespace UnusedWebpackPlugin {
    interface UnusedWebpackPluginOptions {
        /**
         * Array of directories where to look for unused source files.
         *
         * @default []
         */
        directories?: string[] | undefined;

        /**
         * Array of exclude patterns when looking for unused source files.
         *
         * @default []
         */
        exclude?: string[] | undefined;

        /**
         * Root directory that will be use to display relative paths instead of absolute ones.
         */
        root?: string | undefined;

        /**
         * Whether or not the build should fail if unused files are found.
         *
         * @default false
         */
        failOnUnused?: boolean | undefined;

        /**
         * Whether or not to respect .gitignore file.
         *
         * @default true
         */
        useGitIgnore?: boolean | undefined;
    }
}

/**
 * A webpack plugin to find unused modules/source files.
 *
 * @link https://github.com/MatthieuLemoine/unused-webpack-plugin
 */
declare class UnusedWebpackPlugin implements WebpackPluginInstance {
    constructor(options: UnusedWebpackPlugin.UnusedWebpackPluginOptions);
    apply(compiler: Compiler): void;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 1536 GMT
  • Dependencies: @types/webpack

Credits

These definitions were written by Remco Haszing.