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

Mixture between CommonJS and Modules in documentation #290

Open
benjichat opened this issue Apr 8, 2022 · 2 comments
Open

Mixture between CommonJS and Modules in documentation #290

benjichat opened this issue Apr 8, 2022 · 2 comments

Comments

@benjichat
Copy link
Contributor

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?

@jacogr
Copy link
Member

jacogr commented Apr 8, 2022

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)

@polkadot-js-bot
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants