Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: update experimental loader hooks example code
It fix 2 issues in provided Loader hooks examples: 1. Original ``new URL(`${process.cwd()}/`, 'file://');`` is not cross-platform, it gives wrong URL on windows 2. Based on `CHECK` in ModuleWrap::Resolve (node 12.9.1, https://github.com/nodejs/node/blob/v12.9.1/src/module_wrap.cc#L1132) the 2nd parameter should be a `string`, not an `URL` object PR-URL: #29373 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
- Loading branch information