Closed mtdvlpr closed 1 year ago
npm i -D vite-plugin-electron-renderer
electron/main.ts
win = new BrowserWindow({
webPreferences: {
preload,
+ contextIsolation: false,
+ nodeIntegration: true,
},
})
nuxt.config.ts
+ import renderer from 'vite-plugin-electron-renderer'
export default defineNuxtConfig({
modules: [
'nuxt-electron',
],
+ vite: {
+ plugins: [
+ renderer({
+ nodeIntegration: true,
+ }),
+ ],
+ },
})
That fixed it! Thanks!
Hi, I love your module! Just having a problem getting it all to work. I'm not sure this is a bug on your end, but maybe someone can help me figure this out. I can' use any node modules, like path, fs and os. I'm now getting the following error: