Upgrading pdfjs-dist to v4

Is this the same issue we discussed?

I tested private methods on classes, and it works directly on Meteor 3.3 with SWC enabled. We’ve had trouble keeping up with Babel core upgrades, and SWC ensures we can use modern syntax. All current efforts focus on that.

Could you test whether SWC lets you use pdfjs-dist v4 with private method transpilation?

Update: I tested and I get:

SyntaxError: Cannot use ‘import.meta’ outside a module

I will see if I can use recompile in SWC to fix it. Otherwise this will be likely solved by Meteor-RSPack in 3.4, as it will come with ESM full support.


As a side note, with the upcoming Meteor-RSPack integration, all app code will use a modern bundler, which will solve these issues and Babel’s limits for those who prefer to continue using it. Our efforts are towards modernization.