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

Add ESM support #302

Open
ahmadbilaldev opened this issue Jun 22, 2021 · 1 comment
Open

Add ESM support #302

ahmadbilaldev opened this issue Jun 22, 2021 · 1 comment

Comments

@ahmadbilaldev
Copy link

Change the module from CommonJS to ECMAScript Module (ESM). Some JS Frameworks support ESM now and importing CommonJS modules may get complicated. Given that Node.js 12 has become a MAINTENANCE LTS, ECMAScript modules are the official standard format to package JavaScript code for reuse. Converting to ESM is recommended because ESM can still import CommonJS packages, but CommonJS packages cannot import ESM packages synchronously.

Two possible solutions are:

  1. Completely move to JavaScript ES Modules.
  2. Introduce a build step that transpiles a CommonJS fallback.

I can send in a PR if you agree.

@alallier
Copy link
Owner

Yeah we are overdue at looking at this. Going to leave it open we should work on this soon.

@kethinov/@lannonbr would love your opinions on what we should do

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

No branches or pull requests

2 participants