Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add esmodule version #87

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jamsea
Copy link

@jamsea jamsea commented Jul 11, 2022

Taking a look at this issue #86 it seems like to get this working with more modern build tools we just need to make an es module version.

I'm toying with the idea of adding a build command to output events.mjs to events.js so we don't need to change things in two places.

This looks like a large PR but in reality I'm changing these two lines:

module.exports = EventEmitter;
module.exports.once = once;

to this:

export default EventEmitter;
//...
export function once(emitter, name) {

Let me know what you think and if I'm on the right track

@ChrisCates
Copy link

I get this error with my stack trace.

index.js:23 Uncaught (in promise) TypeError: Class extends value undefined is not a constructor or null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants