Skip to content

@pdftron/webviewer no longer works in vite-rolldown version 7.19.0 #1105

@chagweyh

Description

@chagweyh

Starting from version 7.19.0, vite-rolldown changed the way default exports are resolved to make it more consistent with other bundlers, such as esbuild and webpack.

This change breaks @pdftron/webviewer. We now see the following error in the console:

Uncaught TypeError: WebViewer is not a function

Looking at https://cdn.jsdelivr.net/npm/@pdftron/[email protected]/public/core/webviewer-core.min.js, both exports.default and __esModule are used, which may violate this rule: https://publint.dev/rules#cjs_with_esmodule_default_export.

Additional references:

WebViewer version:
11.8.0

Reproduction example:
https://stackblitz.com/~/github.com/chagweyh/webviewer-react

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions