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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 39 additions and 39 deletions

View file

@ -52,7 +52,7 @@ In the main process, set an IPC listener on the `set-title` channel with the `ip
```javascript {6-10,22} title='main.js (Main Process)'
const { app, BrowserWindow, ipcMain } = require('electron')
const path = require('path')
const path = require('node:path')
// ...
@ -183,7 +183,7 @@ provided to the renderer process. Please refer to
```javascript {6-13,25} title='main.js (Main Process)'
const { app, BrowserWindow, dialog, ipcMain } = require('electron')
const path = require('path')
const path = require('node:path')
// ...
@ -378,7 +378,7 @@ target renderer.
```javascript {11-26} title='main.js (Main Process)'
const { app, BrowserWindow, Menu, ipcMain } = require('electron')
const path = require('path')
const path = require('node:path')
function createWindow () {
const mainWindow = new BrowserWindow({