You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Riffing on @nanoskript's workaround, the following provides a dynamicImport() that has the same signature as native import()... so maybe somewhat less "egregious"? 🤷
constdynamicImport=newFunction('a','b','return import(a, b);');// ... then use just like import():awaitdynamicImport("https://cdn.jsdelivr.net/pyodide/v0.23.2/full/pyodide.js")
(Note: new Function() has all the same code smells as eval(), so this is just putting a bit of lipstick on that code-pig.)
This no longer works:
because
import
is turned into arequire
I just found out that this is even documented: https://en.parceljs.org/javascript.html
but it fails as is:
Generated code:
Originally posted by @fregante in #7064 (comment)
The text was updated successfully, but these errors were encountered: