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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Voltrex <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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.