Closed tomlagier closed 2 years ago
@tomlagier thanks for opening this PR. I'm good with the concept with one caveat: I'd like to rename the option to assetHookStage
. Aside from that, please update from upstream/master
where we've fixed the dependency issues, and please resolve any conflicts. Once that's done, we'll merge and ship it.
Sounds good, will get those updates in today.
Updated the PR, but I was having some lint & TS errors in untouched files.
That's strange. Just checked master and it's looking OK.
This https://github.com/shellscape/webpack-manifest-plugin/runs/4777081149?check_suite_focus=true#step:11:92 is why CI was failing. I'll clean this up and push to your branch so this can be merged.
This PR contains:
Are tests included?
Breaking Changes?
If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers: #262
Description
This PR adds the ability to modify the
processAssets
stage that theWebpackManifestPlugin
runs under. Currently, it is hard-coded toInfinity
, which means that it will always run last in theprocessAssets
stack. If we want to do some async behavior based on the output of the manifest, we need to schedule a hook later in theprocessAssets
series.This allows us to manually modify the stage the hook runs at by passing a
processAssetsStage
option. We can set it to, e.g.webpack.Compiler.PROCESS_ASSETS_STAGE_ANALYSE
and then add our own plugin atPROCESS_ASSETS_STAGE_REPORT
.