Open benjichat opened 2 years ago
ESM is actually preferred for all. The documentation is quite old at this point, PRs to adjust are very welcome. (Especially the examples are still from the days before Node had .mjs
support, since they are meant to be runnable, they stuck with cjs)
This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.
Module Example -> https://polkadot.js.org/docs/api/start/create Common Js Example -> https://polkadot.js.org/docs/api/examples/promise/listen-to-blocks
In the overview, it seems like 'CommonJs' is the chosen format. Perhaps a task is to redo some of the examples?