I have not done this myself with this package, but would it be possible to include the worker file as a static resource and reference it in your widget code? Place it in the src or resource folder of your widget project or any subfolder.
You can reference the file in muliple ways from your widget code. Also you could automate at build time to 'update' the node_modules/pdfjs-dist/build version into the widget package to make sure you always have the most updated version without manual copying.
Hope this helps you a step further