webpack / tapable

Just a little module for plugins.
MIT License
3.74k stars 395 forks source link

.tap() `before` parameter do not respects existing befores #168

Open Rulexec opened 2 years ago

Rulexec commented 2 years ago

Hello. I have three plugins:

They tap some hook with same stage in the following order:

Then inside https://github.com/webpack/tapable/blob/9d647f86ddb2930c6e24950a1edd2778453e92a1/lib/Hook.js#L136 they got position incorrectly as:

It happens because current logic looks like:

Rulexec commented 2 years ago

Also it's will be good to throw exception if circular dependency is detected.