Issue 1:
Electron Version:

^12.0.0

Environment:

Arch Linux, npm 6.14.11, node v15.10.0

Last Known Working Electron version:

^11.0.0

Expected Behavior

<script>document.write(process.versions.node)</script>

should not throw an error

Actual Behavior

Uncaught ReferenceError: process is not defined

To Reproduce

index.js

const electron = require('electron')

function createWindow () {
if (electron.BrowserWindow.getAllWindows().length) {
return
}
const win = new electron.BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
}
})
win.loadFile('index.html')
win.openDevTools()
}

electron.app.whenReady().then(createWindow)

index.html

We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.

package.json

{
"name": "fe",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"start": "electron ./index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"electron": "^12.0.0"
}
}

it works fine with electron ^11.0.0

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

v12.0.0

Operating System:

Windows 10 Enterprise

Last Known Working Electron version:

None

Expected Behavior

We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.

Actual Behavior

We are using node , Chrome , and Electron .

To Reproduce

npm init -y

npm i --save electron

Copy and paste code from Quick Start Guide into main.js and index.html

npm start

And receive the following errors with my app starts

Uncaught ReferenceError: process is not defined

at index.html:11

index.html:12 Uncaught ReferenceError: process is not defined

at index.html:12

index.html:13 Uncaught ReferenceError: process is not defined

at index.html:13

package.json

{

"name": "mea",

"version": "1.0.0",

"description": "",

"main": "main.js",

"scripts": {

"start": "electron ."

},

"keywords": [],

"author": "",

"license": "ISC",

"devDependencies": {

"electron": "^12.0.0"

}

}

main.js

const { app, BrowserWindow } = require('electron')

function createWindow () {

const win = new BrowserWindow({

width: 800,

height: 600,

webPreferences: {

nodeIntegration: true,

nodeIntegrationInWorker: true,

enableRemoteModule: true

}

})

win.loadFile('index.html')

}

app.whenReady().then(createWindow)

app.on('window-all-closed', () => {

if (process.platform !== 'darwin') {

app.quit()

}

})

app.on('activate', () => {

if (BrowserWindow.getAllWindows().length === 0) {

createWindow()

}

})

index.html

<title>Hello World!</title>

Hello World!

We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.

Screenshots

Additional Information