mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
docs: use node: imports for node core modules (#39681)
docs: use `node:` imports for node builtin modules
This commit is contained in:
@@ -303,7 +303,7 @@ without having to step through the isolated world.
|
||||
|
||||
```js title='main.js (Main Process)'
|
||||
const { BrowserWindow, app, MessageChannelMain } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
app.whenReady().then(async () => {
|
||||
// Create a BrowserWindow with contextIsolation enabled.
|
||||
|
||||
Reference in New Issue
Block a user