docs: use node: imports for node core modules (#39681)

docs: use `node:` imports for node builtin modules
This commit is contained in:
Erick Zhao
2023-08-30 08:55:23 -07:00
committed by GitHub
parent 2182202e8e
commit b8ac798344
23 changed files with 39 additions and 39 deletions

View File

@@ -83,7 +83,7 @@ To attach this script to your renderer process, pass its path to the
```js {2,8-10} title="main.js"
const { app, BrowserWindow } = require('electron')
const path = require('path')
const path = require('node:path')
const createWindow = () => {
const win = new BrowserWindow({
@@ -204,7 +204,7 @@ you send out the `invoke` call from the renderer.
```js {1,15} title="main.js"
const { app, BrowserWindow, ipcMain } = require('electron')
const path = require('path')
const path = require('node:path')
const createWindow = () => {
const win = new BrowserWindow({