Closed MichaelJCole closed 9 months ago
I think quasar mode add
installs electron-vite
here: https://github.com/quasarframework/quasar/blob/dev/app-vite/lib/cache/module.electron.js#L15
The contextIsolation: false
, and nodeIntegration: true
is not necessary, It seems that the latest electron-vite template project has already closed theme.
@caoxiemeihao @yejimeiming yes, you are correct. Thank you!
Hi, I'm coming from Quasar, which is another Vue project that integrates with Electron through vite.
I want some features from Nuxt 3, so I'm looking for an alternative.
The electron security checklist says
nodeIntegration: true
andcontextIsolation: false
are a security issue.I got the Quick-start running, but I'm unable to see content without disabling these security features.
Is there a reason this must be done for nuxt-electron?
This is the minimum nuxt-electron webPreferences config to see content:
Quasar's electron security checklist has a strong warning about this, and it's not necessary to disable these security features in development to get HMR.
What's different about Nuxt that requires disabling them?
You can try Quasar like this:
In the file
src-electron/electron-main.js
, around line 20, the app instantiates the main window with contextIsolation and w/o nodeIntegration:How can I enable these security features in nuxt-electron?
Thank you!