Skip to content

Commit

Permalink
feat: process html during the processAssets stage PROCESS_ASSETS_STAG…
Browse files Browse the repository at this point in the history
…E_OPTIMIZE_INLINE
  • Loading branch information
jantimon committed Jan 20, 2021
1 parent b09b439 commit 86245db
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,17 @@ function hookIntoCompiler (compiler, options, plugin) {
compilation.hooks.processAssets.tapAsync(
{
name: 'HtmlWebpackPlugin',
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS
stage:
/**
* Generate the html after minification and dev tooling is done
*/
webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE
},
/**
* Hook into the PROCESS_ASSETS_STAGE_ADDITIONS hook
* @param {WebpackCompilation} compilationAssets
* @param {(err?: Error) => void} callback
*/
* Hook into the process assets hook
* @param {WebpackCompilation} compilationAssets
* @param {(err?: Error) => void} callback
*/
(compilationAssets, callback) => {
// Get all entry point names for this html file
const entryNames = Array.from(compilation.entrypoints.keys());
Expand Down

0 comments on commit 86245db

Please sign in to comment.