Error after electron-vue is upgraded to 12x:

Uncaught ReferenceError: require is not defined
    at (index):1
Uncaught ReferenceError: process is not defined
    at (index):1
Uncaught ReferenceError: module is not defined
    at renderer.js:1
Copy the code

Solution: Add contextIsolation: false in main.js

WebPreferences: {nodeIntegration: true, / / whether to enable nodes integrated nodeIntegrationInWorker: true, / / whether the device is enabled in the Web work contextIsolation Node integration: DevTools :true,// Whether devTools is enabled // webSecurity: true// Whether the same Origin policy is disabled (deleted online)}Copy the code