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
Understandably, esm.sh will recognise and generate an esm export for the Object.defineProperty(exports, "foo", { value: 1 }) but not the __exportStar((require("./bar"), exports). Despite the non-exactness I think it could be worth transpiling all instances of
__exportStar(require("<specifier>"),exports);
to
export*from"<specifier>";
As described above, this will enable a lot more modules from the Node/TS ecosystem to run correctly in browsers and Deno @ije.
which doesn't contain the export * from './value' in the original source.
As a result, import { Value } from "https://esm.sh/@sinclair/[email protected]/value" gives the following runtime error in Deno:
error: Uncaught SyntaxError: The requested module 'https://esm.sh/@sinclair/[email protected]/value' does not provide an export named 'Value'
import { Value } from "https://esm.sh/@sinclair/[email protected]/value";
^
The text was updated successfully, but these errors were encountered:
If a node typescript library has the following content:
and the author transpiles it using
tsc
targeting cjs, they get something resembling:and they upload that to npm.
Understandably, esm.sh will recognise and generate an esm export for the
Object.defineProperty(exports, "foo", { value: 1 })
but not the__exportStar((require("./bar"), exports)
. Despite the non-exactness I think it could be worth transpiling all instances ofto
As described above, this will enable a lot more modules from the Node/TS ecosystem to run correctly in browsers and Deno @ije.
Reproduction / example library (from @sinclairzx81)
export * from './value'
in the original source.As a result,
import { Value } from "https://esm.sh/@sinclair/[email protected]/value"
gives the following runtime error in Deno:The text was updated successfully, but these errors were encountered: