os-js/osjs-pdfreader-application

Application does not work in production (demo)

andersevenrud opened this issue · 1 comments

When launching the following error occurs:

TypeError: Cannot read property 'mark' of undefined
    at https://demo.os-js.org/v3/apps/PDFReader/main.js:8:391706

This comes from loading the asset and not on runtime. After a bit of research it seems that's a webpack spesific issue (maybe related to generators when resolving the graph).

At first I thought this maybe was related to how webpack splits the worker entry into two chunks, but when trying to straight up copy the workers the PDFJS library would not load.

Now, I can't reproduce locally even when compiling for production mode. The only difference between my local development setup and the demo server is that it runs behind SSL via a proxy -- which should not even matter.

🤔

Solved by e5c0aaf

Turns out it was a Babel + Regenerator issue.