| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
I don't think we should be documenting using a non-standard flag here in the docs... but we could improve the documentation above to make the difference between extensionless file path (path has no extension) and extensionless specifiers (path has extension, specifier doesn't, node resolves extension) clearer
Sorry, something went wrong.
| import './startup.js'; // Loaded as ES module because of package.json | ||
|
|
||
| // Extensionless. Requires 'node --es-module-specifier-resolution=node' | ||
| import './startup'; // Loaded as ES module because of package.json |
There was a problem hiding this comment.
Extensionless files, as documented above, are different from extensionless specifiers (which you are documenting here). Extensionless files mean the file path itself has no extension e.g. /path/to/file, not the specifier e.g. './file' where path is /path/to/file.js.
Sorry, something went wrong.
There was a problem hiding this comment.
Ah I see. Yeah it could definitely be clarified.
Sorry, something went wrong.
There was a problem hiding this comment.
Would you be ok removing this line and instead clarifying above?
Sorry, something went wrong.
There was a problem hiding this comment.
Done. Had trouble writing it succinctly so let me know if it makes sense.
Sorry, something went wrong.
What do you mean by "non-standard flag"? |
Sorry, something went wrong.
There was a problem hiding this comment.
Took a quick stab at some slightly different text, unsure if it is better. Happy to see this land with the suggested changes ignore or landed.
Sorry, something went wrong.
Co-Authored-By: Myles Borins <myles.borins@gmail.com>
Co-Authored-By: Myles Borins <myles.borins@gmail.com>
Co-Authored-By: Myles Borins <myles.borins@gmail.com>
|
I don't know if is necessary, but in #30699, CJS module will give suggestions when file extension is not provided, maybe it would be nice in this docs. |
Sorry, something went wrong.
|
Landed in 3e5967b @juanarbol I think documenting #30699 is a great idea, but should likely happen in that PR (so we don't land the docs before the change is landed) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #30655
Checklist