mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-02-08 00:21:11 +01:00
To make it easier to tell which PDF.js version/commit that the *built* files correspond to, they have (since many years) included `pdfjsVersion` and `pdfjsBuild` constants with that information. As currently implemented this has a few shortcomings: - It requires manually adding the code, with its preprocessor statements, in all relevant files. - It requires ESLint disable statements, since it's obviously unused code. - Being unused, this code is removed in the minified builds. - This information would be more appropriate as comments, however Babel discards all comments during building. - It would be helpful to have this information at the top of the *built* files, however it's being moved during building. To address all of these issues, we'll instead utilize Webpack to insert the version/commit information as a comment placed just after the license header.