-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
globalPreload docs have non-working code #50279
Comments
Thanks for reporting, would you be interested in opening a PR? |
will do |
question: should i submit separate PRs for each version of the docs, a single PR based on a single version of the doc, etc? i'm not sure how to proceed with multiple targets. if the first, do i just use, say, the latest version of 16 to update the v16 docs, then another using the latest versions of 18, etc. |
nope, just a pull request to main with the fix |
You should submit one PR only, against the highest affected version. |
Also note that Node.js 16 is End-of-Life so will not have any new releases. |
Fixes: nodejs/node#50279 PR-URL: nodejs/node#50300 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Fixes: nodejs/node#50279 PR-URL: nodejs/node#50300 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Affected URL(s)
https://nodejs.org/docs/latest-v16.x/api/esm.html#globalpreload
https://nodejs.org/docs/latest-v18.x/api/esm.html#globalpreload
Description of the problem
The example code from the docs doesn't work.
port.onmessage
doesn't work. the code needs to beport.on('message', ...)
. Additionally, there is justdata
, notevt.data
.I know that globalPreload is gone in 20, so feel free to close this. I am working with making loaders work across multiple versions of node and this was a problem that I ran into.
The text was updated successfully, but these errors were encountered: