+
Skip to content

Add ESM support #302

@ahmadbilaldev

Description

@ahmadbilaldev

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载