-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Here are a few questions I've seen multiple times or asked for myself in discord, along with how I solved it. Not sure if they fit in here or not. As I suck at wording I'm just gonna leave them here in case someone wants to make a proper Q&A out of them. 😃
Is it possible to provide my own express instance / webpack-dev-server for my quasar.config.js, rather than quasar creating one for me?
I wanted to bundle my server and client repo, and let the server serve the client code too. Specially in development mode, same origin and all that.
I ended up using http-proxy-middleware. I proxied all /frontend/** requests to the webpack server, and kept handling everything else on my existing instance.
Tips on debugging app-extensions, specifically the server / build steps, which isn't hot reloaded.
I also wanted to debug the main process (my app extension index file) as I was making changes to the quasar/webpack config, which isn't being watched? What I ended up doing was setting a flag to exit the node process once my extension runner was done, skipping the whole front-end build and just quit early (
process.exit()). Something likenodemoncould be added to the mix for hot-reloading / re-start.
[Electron] Is it possible having a nodejs server inside a quasar application?
You can init server-side packages (
expressjs,feathersjs, etc) in/src-electron/main-processwhen using electron, just be careful and make sure to protect it!
[Electron] Is it possible to hot-reload the main-process / server?
This is how I solved my hot reloading problem. I avoid importing my server (
feathersjs) withrequireorimportas quasar will then watch the file and shut down electron if any changes are detected. Instead I watch the file myself withchokidar, I import the module with__non_webpack_require__, upon changes I walk through the cache and delete the stuff related to my module (__non_webpack_require__.cache) and then re-require it.