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:
@@ -22,7 +22,7 @@ In `preload.js` use the [`contextBridge`][] to inject a method `window.electron.
|
||||
|
||||
```js
|
||||
const { contextBridge, ipcRenderer } = require('electron')
|
||||
const path = require('path')
|
||||
const path = require('node:path')
|
||||
|
||||
contextBridge.exposeInMainWorld('electron', {
|
||||
startDrag: (fileName) => {
|
||||
|
||||
Reference in New Issue
Block a user