Can we use electron functions within external web app?



  1. We are loading the external web by using this
  2. This is a separate angular app actually.
  3. We are hosting the angular app in the electron app.
  4. The angular app working great when sitting in electron app.


  1. Can we use the electron function in the external web? Something like we do in electron app.
    const { shell } = require('electron');
    const SerialPort = require('serialport');
  2. If we do can, what is the syntax for TypeScript?

Thanks in advance.


I’m new to Electron (actually to web dev too) so take this with a grain of salt. I am using Vue.js and in many of the Vue JS files I do have access to the main.js in “node”.

const electron = require(‘electron’)
const remote = require(‘electron’).remote;
const ipcRenderer = require(‘electron’).ipcRenderer

Review the ipcRenderer and Electron.remote in the doc’s.


Thanks johnf for your response. I do can access the node module when I load the web via file:/.

The question is regarding the mainWindow.loadURL(‘’). It’s the remote web I am loading, not in current Electron app.


If I understood correctly, you are looking for node integration attribute in the webview tag.