SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.47k stars 1.54k forks source link

preload.js does not work.. #1000

Closed paulyu12 closed 4 years ago

paulyu12 commented 4 years ago

My project tree: my-electron-vue-project

In src/main/index.js image

In src/main/preload.js image

In my renderer script: image

The reason I turn nodeIntegration to False is for security, but window.isElectron (I defined it in preload.js) is always false !!!

paulyu12 commented 4 years ago

I turnt 'join' to 'resolve', and it worked for me.