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

Convert CommonJS to ECMAScript Modules (ESM) #1230

Open
haricnugraha opened this issue Jan 8, 2024 · 1 comment
Open

Convert CommonJS to ECMAScript Modules (ESM) #1230

haricnugraha opened this issue Jan 8, 2024 · 1 comment
Assignees
Labels
Tech Debt Techdebt need to be implemented the sooner the better, as its getting expensive if implemented later

Comments

@haricnugraha
Copy link
Contributor

As the Node.js community moves toward ESM, I am looking to switch the project from CommonJS to ECMAScript Modules (ESM). This change is essential to take advantage of ESM's improved support for static analysis, tree shaking, and more reliable code structuring.

Read more:

@haricnugraha haricnugraha added the Tech Debt Techdebt need to be implemented the sooner the better, as its getting expensive if implemented later label Jan 8, 2024
@haricnugraha
Copy link
Contributor Author

I've tried to convert the code to ESM. I've successfully converted it, able to run it. But I can't run the test. You can see the code here. I suspect there is a problem with Mocha. I got the following error.

Screenshot 2024-03-25 at 2 07 32 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tech Debt Techdebt need to be implemented the sooner the better, as its getting expensive if implemented later
Projects
None yet
Development

No branches or pull requests

2 participants