dnt
dnt copied to clipboard
Code broken by import-meta-ponyfill-esmodule
When trying to prepare a package with dnt, I found an error like "TypeError: globalThis[Symbol.for(...)] is not a function"
It seems to have been caused by this code:
const ProxiedStruct = function (
...args: ConstructorParameters<typeof Struct>
) {
return Reflect.construct(Struct, args, new.target)
}
Getting transformed to:
const ProxiedStruct = function (...args) {
return Reflect.construct(Struct, args, globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta));
};