Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load ESM modules using ui.script #2331

Closed
marek-mihok opened this issue May 15, 2024 · 0 comments · Fixed by #2332
Closed

Unable to load ESM modules using ui.script #2331

marek-mihok opened this issue May 15, 2024 · 0 comments · Fixed by #2332
Assignees
Labels
feature Feature request

Comments

@marek-mihok
Copy link
Contributor

Is your feature request related to a problem? Please describe

Latest versions of pdfjs are built as JavaScript modules (.mjs). When trying to load it with ui.script() I'm getting the following error Uncaught SyntaxError: Unexpected token 'export' (at pdf.min.mjs:4108:1).

Describe the solution you'd like

Add the type attribute to ui.script() and be able to specify type="module" attribute to HTML <script> element as specified here https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant