Open zardoy opened 1 year ago
Thanks for sharing, agreed this is an important case to fix. Tracking.
Thanks for all the work on this library, just sharing one place this is currently causing breaks for me. Twilio-video attempts to extend EventEmitter in quite a few classes and the above error is encountered. Just also noting, the recently released Remix v2 migrates to the jspm-core polyfills from this repo so this likely will start effecting more people.
Thanks for all the work on this library, just sharing one place this is currently causing breaks for me.
IMO this is really huge breakage since as I understand the intention of that plugin is to support legacy code. Also, I'm curious to know why jspm was chosen instead of the classical webpack-way polyfillying? I'm using alias
and banner
options instead now which work fine :shrug :
One option here might be to use package exports conditions to match a CommonJS implementation as necessary for this specific builtin. A suitable conditions might be "commonjs"
, defining this condition to mean "the build environment supports commonjs" (effectively the converse of the "module" condition).
Note this story will improve with Node.js's new require(esm)
support.
to demonstrate:
I noticed after bundle errors like
TypeError: Class extends value #<Object> is not a constructor or null
of the following sample code below (coming here from esbuild plugin):Please ask if unclear.