I am getting document.ready event hitting twice. console logging shows one from xxx.js, and another from xxx.js?v=somenumber [closed]

I am getting document.ready event hitting twice. console logging shows one from xxx.js, and another from xxx.js?v=somenumber

We were using edge, but we also saw the same “hitting twice” behavior in chrome. Edge is the one that showed us the two different versions of xxx.js , which were also in the source tab of the developer tools in Edge.

In the bundleconfig.cs file we had zzz.js including xxx.js, and once we removed this the two-document-ready hits behavior went away, and the source tab showed only one version of xxx.js (the one with the ?v=somenumber added).

Why were there two versions of xxx.js, and why were they both somehow active at the same time (both throwing the document.ready event)?