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

Wechaty Ecosystem is moving towards to ES Modules #1275

Open
huan opened this issue Sep 9, 2021 · 0 comments
Open

Wechaty Ecosystem is moving towards to ES Modules #1275

huan opened this issue Sep 9, 2021 · 0 comments

Comments

@huan
Copy link
Member

huan commented Sep 9, 2021

We have decided to use ES Modules by default for all Wechaty projects, are working hard to refactoring all NPM modules from the Wechaty ecosystem from CommJS to ESM. See:

For now, the Wechaty Getting Started has been already switched to ES Module mode, which means:

  1. We must use ESM to import module: import { Module } from 'module'
  2. The require will not be supported anymore. (will through a Node.js error if use it with ESM)

For our tech writers, we need to:

  1. Always use import { Module } from 'module' in our new docs
  2. Replace the require('module') in old docs with import syntax whenever we see it

We will also replace all the contents from our blogs as well, which will be a huge project and we will do it later.

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

1 participant