# @types/script-ext-html-webpack-plugin

> TypeScript definitions for script-ext-html-webpack-plugin

Latest version **2.1.6** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/script-ext-html-webpack-plugin
pnpm add @types/script-ext-html-webpack-plugin
yarn add @types/script-ext-html-webpack-plugin
bun add @types/script-ext-html-webpack-plugin
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.6 |
| Published | 2023-11-07 |
| First published | 2019-01-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/script-ext-html-webpack-plugin
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/script-ext-html-webpack-plugin
- npm.io page: https://npm.io/package/@types/script-ext-html-webpack-plugin

## Dependencies (1)

- [@types/webpack](https://npm.io/package/@types/webpack.md) ^4

## Recent versions

- 2.1.6 (latest) — 2023-11-07
- 2.1.3 (ts3.7) — 2021-07-06
- 2.1.1 (ts2.3) — 2019-07-12
- 2.1.5 — 2023-10-18
- 2.1.4 — 2023-09-25
- 2.1.2 — 2021-03-25
- 2.1.0 — 2019-01-30

## README

# Installation
> `npm install --save @types/script-ext-html-webpack-plugin`

# Summary
This package contains type definitions for script-ext-html-webpack-plugin (https://github.com/numical/script-ext-html-webpack-plugin).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/script-ext-html-webpack-plugin.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/script-ext-html-webpack-plugin/index.d.ts)
````ts
import { Compiler, Plugin } from "webpack";

export = ScriptExtHtmlWebpackPlugin;

declare class ScriptExtHtmlWebpackPlugin extends Plugin {
    constructor(options?: ScriptExtHtmlWebpackPlugin.Options);

    apply(compiler: Compiler): void;
}

type ScriptMatchingPatternBase =
    | string
    | RegExp
    | ReadonlyArray<string | RegExp>;

interface ScriptMatchingPatternHash {
    test: ScriptMatchingPatternBase;
}

type ScriptMatchingPattern =
    | ScriptMatchingPatternBase
    | ScriptMatchingPatternHash;

type ScriptMatchingPatternPre =
    | ScriptMatchingPatternBase
    | ScriptMatchingPatternHash & {
        chunks?: "initial" | "async" | "all" | undefined;
    };

interface Custom {
    test: ScriptMatchingPattern;
    attribute: string;
    value?: string | undefined;
}

declare namespace ScriptExtHtmlWebpackPlugin {
    interface Options {
        /**
         * scripts that should be inlined in the html (default: `[]`)
         */
        inline?: ScriptMatchingPattern | undefined;
        /**
         * script names that should have no attribute (default: `[]`)
         */
        sync?: ScriptMatchingPattern | undefined;
        /**
         * script names that should have an async attribute (default: `[]`)
         */
        async?: ScriptMatchingPattern | undefined;
        /**
         * script names that should have a defer attribute (default: `[]`)
         */
        defer?: ScriptMatchingPattern | undefined;
        /**
         * the default attribute to set - 'sync' actually results in no attribute (default: 'sync')
         */
        defaultAttribute?: "sync" | "async" | "defer" | undefined;
        /**
         * script names that should have a type="module" attribute (default: `[]`)
         */
        module?: ScriptMatchingPattern | undefined;
        /**
         * scripts that should have accompanying preload resource hints (default: `[]`)
         */
        preload?: ScriptMatchingPatternPre | undefined;
        /**
         * scripts that should have accompanying prefetch resource hints (default: `[]`)
         */
        prefetch?: ScriptMatchingPatternPre | undefined;
        /**
         * scripts that should have a custom attribute(s) added, the attribute(s), and the value(s)
         */
        custom?: Custom | Custom[] | undefined;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack)

# Credits
These definitions were written by [Dave Cardwell](https://github.com/davecardwell).

---
_Source: https://npm.io/package/@types/script-ext-html-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
