From 4cb57ad1a0e7096336694fdfcbab54f7068265fe Mon Sep 17 00:00:00 2001 From: Rhitik Bhatt Date: Mon, 15 Aug 2022 11:53:59 +0530 Subject: [PATCH] docs: removes unused import in preload script (#35324) * Remove unused import of path This import gives out the error in the preload script: Error: module not found: path at preloadRequire * Removes unused import in preload script notes: Removes unused import which causes issue in preload script of drag and drop tutorial * Remove import path as it is not used in the script note: Removes import path as it is not used in the script --- docs/fiddles/features/drag-and-drop/preload.js | 1 - docs/tutorial/native-file-drag-drop.md | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/fiddles/features/drag-and-drop/preload.js b/docs/fiddles/features/drag-and-drop/preload.js index 4609e12c7552..7e698ebb54ff 100644 --- a/docs/fiddles/features/drag-and-drop/preload.js +++ b/docs/fiddles/features/drag-and-drop/preload.js @@ -1,5 +1,4 @@ const { contextBridge, ipcRenderer } = require('electron') -const path = require('path') contextBridge.exposeInMainWorld('electron', { startDrag: (fileName) => { diff --git a/docs/tutorial/native-file-drag-drop.md b/docs/tutorial/native-file-drag-drop.md index 75ef4eb212cd..0b8b53321243 100644 --- a/docs/tutorial/native-file-drag-drop.md +++ b/docs/tutorial/native-file-drag-drop.md @@ -22,7 +22,6 @@ In `preload.js` use the [`contextBridge`] to inject a method `window.electron.st ```js const { contextBridge, ipcRenderer } = require('electron') -const path = require('path') contextBridge.exposeInMainWorld('electron', { startDrag: (fileName) => {