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

ESM support will be required after Wechaty v0.69+ #148

Closed
huan opened this issue Sep 2, 2021 · 1 comment
Closed

ESM support will be required after Wechaty v0.69+ #148

huan opened this issue Sep 2, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@huan
Copy link
Member

huan commented Sep 2, 2021

Currently, the Wechaty ecosystem is moving from CommonJS to ES Modules.

The Wechaty will be Dual-ESM-CJS-Module supported, and the default mode will be under ESM.

In order to load Wechaty Puppet under ESM mode by setting the environment variable WECHATY_PUPPT, or by setting the options.puppet = 'wechaty-puppet-xxx', the puppet provider NPM module must support ESM.

If the puppet does not support ESM, then the Wechaty will run into the below issue: TypeError: MyPuppet is not a constructor

@huan
Copy link
Member Author

huan commented Oct 16, 2021

We have added a workaround in Wechaty so that it can load CJS puppet modules.

@huan huan closed this as completed Oct 16, 2021
@huan huan unpinned this issue Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant