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 nodejs-github-bot committed Oct 27, 2021
1 parent 3165eb9 commit e55ab89
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 @@ -892,11 +892,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 e55ab89

Please sign in to comment.