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
feat: add node: prefixed modules #12693
Conversation
For maintainers only:
|
Can you add small test? |
make to sure to also add a test case for that. |
@dnalborczyk Thanks for your update. I labeled the Pull Request so reviewers will review it again. @sokra Please review the new changes. |
hmm, seems like |
that's what I tried to explain here: #12181 (comment) this will be (could be) supported soon in node.js for commonjs modules as well (also mentioned on top of this thread): nodejs/node#37246
I thought esm support is currently being added to webpack? https://github.com/webpack/webpack/releases/tag/v5.22.0 |
@dnalborczyk I think we need wait when it was merged and we can merge it too |
@alexander-akait it's merged now. it seems it's being shipped in node v16.x and possibly backported later on. |
Ok node merged |
This will close #13290 when merged |
@dnalborczyk friendly ping |
So this feature is about to get more usage: the https://nodejs.org/api/esm.html -> link "node: Imports" (links with anchors don't scroll properly right now) |
An alternative to the approaches in #13311 and #12693 would be to use |
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
@sokra The most important CI builds failed. This way your PR can't be merged. Please take a look at the CI results from azure (1 errors / 1 warnings) and appveyor (success) and fix these issues. |
Thanks |
Thanks @sokra! Looking forward to using this! (also with our students in Next.js!) Will this be in a new patch ( |
@fregante please create steps to reproduce, if you use |
You can use alias and use https://github.com/browserify/path-browserify |
But maybe better to ask developer provide browser based version of library |
It will be used if it is provided |
Give me time, I will investigate |
Because the problem in other place, what is the problem with waiting an answer? |
Change your import on |
And we cannot analyze it is subpath for browser or not, so you should explicitly use |
But here other problem |
Issue for |
I don't know what we need explain here, Node.js docs describe how |
Where we should docs it? |
Here answer #12693 (comment), |
And should not do it -
No |
No need discussion, what is the problem? I answered the same multiple times, |
What kind of change does this PR introduce?
follow-up from: #12181
adds 'node:' prefixed builtin modules.
https://nodejs.org/docs/latest-v12.x/api/esm.html#esm_node_imports
nodejs/node#37246
Did you add tests for your changes?
Does this PR introduce a breaking change?
What needs to be documented once your changes are merged?