What is the benefit of importing a dependency only as devDependency and including it like this in the build? Why not just declare a normal dependency?
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.