-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support ESM module (Dual-ESM-CJS-module) #16
Comments
Thanks for providing all those informative links for us to read @huan, So
Would you explain just in high level what your strategy is please @huan? Especially, are you going to follow the recommendation to
Thanks! |
I meant, this is how I've been consuming wechaty in my plain JavaScript app: const {
Wechaty,
ScanStatus,
log,
} = require('wechaty') And I presume lots of JavaScript developers are doing the same thing as well.
At the very least, what we JavaScript developers should do, after such transition is finished? Hopefully "Dual-ESM-CJS-module" means that we can still use our existing scripts without huge alternations. thx. |
(taken from Hmm..., maybe it is time to take plan # |
Yes, the ESM is the future and we should take it as soon as possible. However, for maximum compatibility and a better developer experience, the Wechaty community strategy is to build a Dual-CJS-ESM package, which is what this issue is tracking about: you can use either |
👍👍👍 |
I tried, but one works and one doesn't. and now it is working. Ref padlocal/wechaty-puppet-padlocal-demo#16 So I'd conclude that the ESM module support is still broken, unfortunately. |
Progress
HotImportHowto
Links
ts-node
fails when ES Modules are in the dependency graph in Node.js 13+ TypeStrong/ts-node#935Badge
The text was updated successfully, but these errors were encountered: