@types/script-ext-html-webpack-plugin
TypeScript definitions for script-ext-html-webpack-plugin
Last updated 2 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/script-ext-html-webpack-plugin 
SYNC missed versions from official npm registry.

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

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

Credits

These definitions were written by Dave Cardwell.

Current Tags

  • 2.1.6                                ...           latest (2 years ago)
  • 2.1.1                                ...           ts2.3 (7 years ago)
  • 2.1.1                                ...           ts2.4 (7 years ago)
  • 2.1.1                                ...           ts2.5 (7 years ago)
  • 2.1.1                                ...           ts2.6 (7 years ago)
  • 2.1.1                                ...           ts2.7 (7 years ago)
  • 2.1.1                                ...           ts2.8 (7 years ago)
  • 2.1.1                                ...           ts2.9 (7 years ago)
  • 2.1.1                                ...           ts3.0 (7 years ago)
  • 2.1.1                                ...           ts3.1 (7 years ago)
  • 2.1.1                                ...           ts3.2 (7 years ago)
  • 2.1.1                                ...           ts3.3 (7 years ago)
  • 2.1.1                                ...           ts3.4 (7 years ago)
  • 2.1.1                                ...           ts3.5 (7 years ago)
  • 2.1.1                                ...           ts3.6 (7 years ago)
  • 2.1.3                                ...           ts3.7 (5 years ago)
  • 2.1.3                                ...           ts3.8 (5 years ago)
  • 2.1.3                                ...           ts3.9 (5 years ago)
  • 2.1.3                                ...           ts4.0 (5 years ago)
  • 2.1.3                                ...           ts4.1 (5 years ago)
  • 2.1.3                                ...           ts4.2 (5 years ago)
  • 2.1.3                                ...           ts4.3 (5 years ago)
  • 2.1.3                                ...           ts4.4 (5 years ago)
  • 2.1.6                                ...           ts4.5 (2 years ago)
  • 2.1.6                                ...           ts4.6 (2 years ago)
  • 2.1.6                                ...           ts4.7 (2 years ago)
  • 2.1.6                                ...           ts4.8 (2 years ago)
  • 2.1.6                                ...           ts4.9 (2 years ago)
  • 2.1.6                                ...           ts5.0 (2 years ago)
  • 2.1.6                                ...           ts5.1 (2 years ago)
  • 2.1.6                                ...           ts5.2 (2 years ago)
  • 2.1.6                                ...           ts5.3 (2 years ago)
  • 2.1.6                                ...           ts5.4 (2 years ago)
  • 2.1.6                                ...           ts5.5 (2 years ago)
  • 2.1.6                                ...           ts5.6 (2 years ago)
  • 2.1.6                                ...           ts5.7 (2 years ago)
  • 2.1.6                                ...           ts5.8 (2 years ago)
  • 2.1.6                                ...           ts5.9 (2 years ago)

7 Versions

  • 2.1.6                                ...           2 years ago
  • 2.1.5                                ...           2 years ago
  • 2.1.4                                ...           3 years ago
  • 2.1.3                                ...           5 years ago
  • 2.1.2                                ...           5 years ago
  • 2.1.1                                ...           7 years ago
  • 2.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |