Skip to content

Commit 81d7b2c

Browse files
committed
feat: add typings for options and version
1 parent 8d34b81 commit 81d7b2c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/child-compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class HtmlWebpackChildCompiler {
178178
// Therefore the array index of this.templates should be the as entryIndex.
179179
result[this.templates[entryIndex]] = {
180180
content: templateSource,
181-
hash: childCompilation.hash,
181+
hash: childCompilation.hash || 'XXXX',
182182
entry: entries[entryIndex]
183183
};
184184
});

typings.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ export = HtmlWebpackPlugin;
77
declare class HtmlWebpackPlugin {
88
constructor(options?: HtmlWebpackPlugin.Options);
99

10+
userOptions: HtmlWebpackPlugin.Options;
11+
12+
/** Current HtmlWebpackPlugin Major */
13+
version: number;
14+
15+
/**
16+
* Options after html-webpack-plugin has been initialized with defaults
17+
*/
18+
options?: HtmlWebpackPlugin.ProcessedOptions;
19+
1020
apply(compiler: Compiler): void;
1121

1222
static getHooks(compilation: Compilation): HtmlWebpackPlugin.Hooks;

0 commit comments

Comments
 (0)