to demonstrate:
console.log(typeof require("events")) // (Node.js, events npm package): function
console.log(typeof require("events")) // (from nodelibs of this package): object { default, ... }
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):
const EventEmitter = require('events');
class A extends EventEmitter {} // ...
Please ask if unclear.
to demonstrate:
I noticed after bundle errors like
TypeError: Class extends value #<Object> is not a constructor or nullof the following sample code below (coming here from esbuild plugin):Please ask if unclear.