Skip to content

CommonJS incompatible? (events, stream) #87

Description

@zardoy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions