From 89aa83842a50ac651b58cd68bd29f9ff4f8a028f Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Fri, 8 Nov 2024 05:27:17 -0500 Subject: [PATCH] doc: add esm example in `path.md` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/55745 Reviewed-By: Luigi Pinca Reviewed-By: Chemi Atlow Reviewed-By: Ulises Gascón --- doc/api/path.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/api/path.md b/doc/api/path.md index 8f1bf61ba2f25d..eb558e73592e4d 100644 --- a/doc/api/path.md +++ b/doc/api/path.md @@ -9,10 +9,14 @@ The `node:path` module provides utilities for working with file and directory paths. It can be accessed using: -```js +```cjs const path = require('node:path'); ``` +```mjs +import path from 'node:path'; +``` + ## Windows vs. POSIX The default operation of the `node:path` module varies based on the operating