Quasar v2 Electron Renderer process Issue #13282
-
Hello! I am trying to build an electron project and having issues using electron components in the renderer process.
Output: Module not found: Can't resolve imported dependency "fs" App • ERROR • Renderer in ./node_modules/electron/index.js Module not found: Can't resolve imported dependency "path" Can you help me? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
In renderer process you can not use something like |
Beta Was this translation helpful? Give feedback.
-
https://quasar.dev/quasar-cli-webpack/developing-electron-apps/electron-preload-script electron-main.js ipcMain.handle('foo', (event, args) => {
console.log(args)
}) electron-preload.js foo() {
ipcRenderer.invoke('foo')
}, vue window.myWindowAPI.foo() vue -> electron-preload.js -> electron-main.js |
Beta Was this translation helpful? Give feedback.
https://quasar.dev/quasar-cli-webpack/developing-electron-apps/electron-preload-script
electron-main.js
electron-preload.js
vue
vue -> electron-preload.js -> electron-main.js