presumably, declaring it this way means you don't ever distribute pdfjs but expect it to be available in the runtime.
Not sure if this was the goal.
Not sure if this was the goal.
I’d guess it makes sense for PDF.js since you likely won’t need it outside of this library in your own project and it comes with multiple builds, of which they might choose one specific.
Then install speeds are faster and node_modules are smaller.