Skip to content

Commit

Permalink
feat: add typings for options and version
Browse files Browse the repository at this point in the history
  • Loading branch information
jantimon committed Feb 3, 2021
1 parent 8d34b81 commit 81d7b2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/child-compiler.js
Expand Up @@ -178,7 +178,7 @@ class HtmlWebpackChildCompiler {
// Therefore the array index of this.templates should be the as entryIndex.
result[this.templates[entryIndex]] = {
content: templateSource,
hash: childCompilation.hash,
hash: childCompilation.hash || 'XXXX',
entry: entries[entryIndex]
};
});
Expand Down
10 changes: 10 additions & 0 deletions typings.d.ts
Expand Up @@ -7,6 +7,16 @@ export = HtmlWebpackPlugin;
declare class HtmlWebpackPlugin {
constructor(options?: HtmlWebpackPlugin.Options);

userOptions: HtmlWebpackPlugin.Options;

/** Current HtmlWebpackPlugin Major */
version: number;

/**
* Options after html-webpack-plugin has been initialized with defaults
*/
options?: HtmlWebpackPlugin.ProcessedOptions;

apply(compiler: Compiler): void;

static getHooks(compilation: Compilation): HtmlWebpackPlugin.Hooks;
Expand Down

0 comments on commit 81d7b2c

Please sign in to comment.