8000 feat: process html during the processAssets stage PROCESS_ASSETS_STAG… · jantimon/html-webpack-plugin@86245db · GitHub
[go: up one dir, main page]

Skip to content

Commit 86245db

Browse files
committed
feat: process html during the processAssets stage PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE
1 parent b09b439 commit 86245db

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

index.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,17 @@ function hookIntoCompiler (compiler, options, plugin) {
214214
compilation.hooks.processAssets.tapAsync(
215215
{
216216
name: 'HtmlWebpackPlugin',
217-
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS
217+
stage:
218+
/**
219+
* Generate the html after minification and dev tooling is done
220+
*/
221+
webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE
218222
},
219223
/**
220-
* Hook into the PROCESS_ASSETS_STAGE_ADDITIONS hook
221-
* @param {WebpackCompilation} compilationAssets
222-
* @param {(err?: Error) => void} callback
223-
*/
224+
* Hook into the process assets hook
225+
* @param {WebpackCompilation} compilationAssets
226+
* @param {(err?: Error) => void} callback
227+
*/
224228
(compilationAssets, callback) => {
225229
// Get all entry point names for this html file
226230
const entryNames = Array.from(compilation.entrypoints.keys());

0 commit comments

Comments
 (0)
0