Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Should ESM module be used instead of CommonJS module?  #193

@actuallyyun

Description

@actuallyyun

Hi,
I am a student of MigraCode Barcelona which forked the Node exercise from CodeYourFuture. I noticed that the exercise uses CommonJS module instead of ESM module . I wasn't aware of the differences at the beginning as I am new to NodeJS. However, while I was trying to use random-item module by require, Node threw me an error. After getting some help, I learned that random-item package I installed is a pure ESM module thus could not be imported through require.
Would it be a good idea to switch to ESM module as this seems to be the standard now?
If you think it's a good idea, I am happy to create a PR for it.
Thank you for your amazing work and I am looking forward to your reply.

Best,
Yun

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