docs: use node:
imports for node core modules (#39681)
docs: use `node:` imports for node builtin modules
This commit is contained in:
parent
2182202e8e
commit
b8ac798344
23 changed files with 39 additions and 39 deletions
|
@ -292,7 +292,7 @@ to the `webPreferences.preload` option in your existing `BrowserWindow` construc
|
|||
```js
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
// include the Node.js 'path' module at the top of your file
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
// modify your existing createWindow() function
|
||||
const createWindow = () => {
|
||||
|
@ -358,7 +358,7 @@ The full code is available below:
|
|||
|
||||
// Modules to control application life and create native browser window
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
const createWindow = () => {
|
||||
// Create the browser window.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue