Description
In our tests, we specifically vary the output chunk contents so that we don't end up with files with the same debug IDs:
It is possible to generate matching output chunks from wildly different input code which will in turn have different sourcemaps. If you consider transpiling, tree shaking and minimising, it's not safe to assume that identical output chunks should use the same sourcemaps.
The chances of this happening in real world usage is quite slim but we should consider it because it'll be very confusing if it does happen!
When adding debug ID support to bundlers, we included the output chunk name when creating the hash of the file. The bundlers already did this when generating filename hashes to avoid this very issue.
calculateDebugID(chunkName + outputSource)
This way we can be sure that every output chunk will have a unique debug ID, even if the output code is identical.