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 Jan 20, 2021
1 parent f691f5b commit 197ddd8
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 197ddd8

Please sign in to comment.