@types/webpack-deadcode-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

Installation

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

Summary

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

Details

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

index.d.ts

import { compilation, Plugin } from "webpack";

interface Options {
    /** Current working directoy for patterns above. If you don't set explicitly, your webpack context will be used. */
    context?: string | undefined;
    /** Whether to run unsed export detection or not. */
    detectUnusedExport?: boolean | undefined;
    /** Whether to run unused files detection or not. */
    detectUnusedFiles?: boolean | undefined;
    /** The array of patterns to not look at. */
    exclude?: string[] | undefined;
    /**
     * Deadcode does not interrupt the compilation by default.
     * If you want to cancel the compilation, set it `true`, it throws a fatal error and stops the compilation.
     */
    failOnHint?: boolean | undefined;
    outputFile?: string | undefined;
    /**
     * The array of patterns to look for unused files and unused export in used files.
     * Directly passed to [`fast-glob`](https://github.com/mrmlnc/fast-glob).
     */
    patterns?: string[] | undefined;
}

declare class WebpackDeadcodePlugin extends Plugin {
    options: Options;

    constructor(options?: Options);

    handleAfterEmit(options: Required<Options>, compilation: compilation.Compilation, callback: () => void): void;
}

export = WebpackDeadcodePlugin;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/webpack

Credits

These definitions were written by Ciarán Ingle.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.5
    1,087
  • 0.1.4
    120
  • 0.1.3
    0
  • 0.1.2
    357
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i @types/webpack-deadcode-plugin

Weekly Downloads

1,564

Version

0.1.5

License

MIT

Unpacked Size

5.29 kB

Total Files

5

Last publish

Collaborators

  • types