Does such a feature exist for TFS build? In TeamCity you can set a build to fail if suddenly your build artifact size changes (can be indicative of a bad bundle). I want to detect if our webpack bundle swells suddenly because of a new package or something.
Here is the doc for TC: Fail build on metric change
Unfortunately no such a built-in feature in TFS.
You can try the extensions like Build Quality Checks which can break a build based on quality metrics like number of warnings or code coverage. But it does not introduce the identification of the artifact size...
We cannot get the build artifact size even via the REST API (Artifacts - Get), so I don't think we can achieve that in TFS.