Skip to content

Commit

Permalink
doc: add node: url scheme
Browse files Browse the repository at this point in the history
PR-URL: #40573
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
  • Loading branch information
dnalborczyk authored and BethGriggs committed Nov 25, 2021
1 parent d72fb7d commit 7a6e833
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/api/esm.md
Expand Up @@ -886,11 +886,10 @@ purposes.

```js
// coffeescript-loader.mjs
import { readFile } from 'fs/promises';
import { dirname, extname, resolve as resolvePath } from 'path';
import { cwd } from 'process';
import { fileURLToPath, pathToFileURL } from 'url';
import { readFile } from 'node:fs/promises';
import { dirname, extname, resolve as resolvePath } from 'node:path';
import { cwd } from 'node:process';
import { fileURLToPath, pathToFileURL } from 'node:url';
import CoffeeScript from 'coffeescript';
const baseURL = pathToFileURL(`${cwd()}/`).href;
Expand Down

0 comments on commit 7a6e833

Please sign in to comment.