Skip to content

Migrate from CommonJS to ESM #4

@JiwaniZakir

Description

@JiwaniZakir

Problem

The project uses CommonJS require() throughout 40+ source files. Modern Node.js 20+ has stable ESM support and many dependencies are moving ESM-only.

Proposed Solution

  • Add "type": "module" to package.json
  • Convert require() calls to import statements
  • Convert module.exports to export statements
  • Update Jest config to support ESM (or migrate to Vitest)
  • This is a larger refactor — could be done incrementally per directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions