Closed Kylart closed 7 years ago
@Kylart This is definitely a valid concern. I'm admittedly an electron(and nuxt) beginner myself. I only made this repo in response to an issue on another nuxt starter repo asking for support for electron. It seemed like a simple enough request lol. That was my first time using electron. Anyway I will do my best to get this fixed but it may take a while as it's been a pretty busy week for me and I'll also need to do some more research on electron and nuxt and probably webpack to figure out a solution to this. In the meantime, feedback from anyone who is more experienced with any/all of the above libraries is very welcome.
@Kylart You may want to also try what I suggested here. Let me know if that helps.
@detrohutt I just read #4 's solution and it actually works really well! Seems like I can require all my packages in the store. I can even put them into the build vendor ! Good job!
Excellent! was it electron-main or electron-renderer target that worked for you?
Only electron-renderer seems to work. If I put electron-main, my app seems not to be working (style and default vue shows up but buttons do not respond for example.
Still, everytime I start the app, I get something like this:
warning in ./~/ajv/lib/async.js
119:15-28 Critical dependency: the request of a dependency is an expression
What I did was const fs = require('fs')
in store/index.js
Yet, it does not seem to affect my application!
Hi,
I am using this starter to migrate my electron app to Nuxt and so far I really like it.
Yet, I have a problem. Actually I have a solution to it and I understand why it is this way but I'd like to get it working just like any electron page.
Electron allows one to get rid (until a certain point) of client and server-side. But here, it is not possible to require any package needing
fs
,tls
andnet
(which includes a lot of packages). In a normal website or Nuxt project, this would be completely normal but here it can be problematic and troublesome sometimes isn't it ?I could not even
require('electron-router')
in the store or on client-side.So right now, I have to make routes like this for example:
Isn't it possible for client to have access to any module as well just like in a basic electron app where I could just
require('fs')
anywhere in the app?I do not intend to criticise anything, just asking 😮