hyperjumptech/monika

Convert CommonJS to ECMAScript Modules (ESM)

haricnugraha opened this issue · 1 comments

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:

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