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 targos committed Nov 6, 2021
1 parent 35dbed2 commit 8f41022
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 @@ -891,11 +891,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 8f41022

Please sign in to comment.