h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.98k stars 328 forks source link

Unable to load ESM modules using ui.script #2331

Closed marek-mihok closed 4 months ago

marek-mihok commented 4 months ago

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 Githubissues.

  • Githubissues is a development platform for aggregating issues.