Uh oh!
There was an error while loading. Please reload this page.
Middleware deduping - #3012
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@patrikholcak is attempting to deploy a commit to the shipshapecode Team on Vercel. A member of the Team first needs to authorize it. |
chuckcarpenter
commented
Oct 11, 2024
@patrikholcak we have been talking about this recently and I recently released a change that changes the ordering, so that a dup added in would run last, but that still could have issues. This would be onus on the user to make sure they still have sane defaults when going down this path, but does give the most control. |
chuckcarpenter
commented
Oct 11, 2024
@patrikholcak docs failed to build due to this error ![]() |
a5bd5fc to
ee832a5Comparepatrikholcak
commented
Oct 16, 2024
Rebased and updated. I also updated a step test which was failing due to the changes in dfb7d74. I’m not sure the test is relevant now, can probably be removed altogether 🤷 |

About
This might be a controversial (and breaking) change, but instead of overriding middlewares, I think the step middleware should always win. Feel free to close this PR or message me to make changes.
Take this example:
To override
defaultStepOptionsyou need equal negative spacing and sync these two numbers every time the default changes (or have a constant)With this PR:
The step offset middleware overrides the default step middleware