Why donate
API Explorer
Upgrade Guide
Creating a New Project
The /quasar.config File
Convert q/app-webpack Project
Browser Compatibility
TypeScript Support
Directory Structure
Commands List
CSS Preprocessors
Page Routing with VueRouter
Lazy Loading - Code Splitting
Handling Assets
Boot Files
Prefetch Feature
API Proxying
Handling Vite
Handling import.meta.env
State Management with Pinia
Lint and Format Code
Testing & Auditing
Developing Mobile Apps
Fetching Data
Opening Dev Server To Public
Quasar CLI with Vite - @quasar/app-vite v3
Electron Build Commands

Developing

quasar dev -m electron

# ..or the longer form:
quasar dev --mode electron

# passing extra parameters and/or options to
# underlying "electron" executable:
quasar dev -m electron -- --force-device-scale-factor=1
# when on Windows and using Powershell:
quasar dev -m electron '--' --force-device-scale-factor=1

It opens an Electron window. The default template also opens renderer DevTools. The renderer supports HMR; changing a main or preload source rebuilds it and restarts Electron.

Arguments after -- are forwarded to Electron. The sandbox-disabling arguments above illustrate forwarding syntax, but should only be used when a constrained environment requires them and after considering the security impact.

See Configuring Electron to extend the Rolldown configurations for the main process and preload scripts.

Chrome DevTools

While in dev mode, hit the following combination (while your app window has focus):

  • macOS: Cmd Alt I or F12
  • Linux: Ctrl Shift I or F12
  • Windows: Ctrl Shift I or F12

Vue DevTools

To load Vue DevTools for the renderer process:

quasar dev -m electron --devtools

Building for Production

quasar build -m electron

# ..or the longer form:
quasar build --mode electron

It builds the application and packages it with the configured bundler. The default is @electron/packager; select electron-builder when you need its installer, signing, or publishing features. See Configuring Electron.

If you want a production build with debugging enabled for the UI code:

quasar build -m electron -d

# ..or the longer form
quasar build -m electron --debug

Here is the folder structure of the outcome:

Packaged
# Packaged by @electron/packager or electron-builder
assets/...
# Vite compiled /src assets
icons/
# Electron app icons
node_modules/
index.html
package.json
electron-main.js
electron-preload.cjs
# (Electron has only CJS support for the preload scripts)
...contents of /public

Cross-platform packaging

Packaging, signing, and native dependencies impose host-platform restrictions. For example, signing a macOS application requires macOS, and packaging Windows resources from another platform may require Wine. Check the selected bundler’s platform requirements and build each target on a matching host or CI runner when signing or native modules are involved.

Publishing (electron-builder only)

quasar build -m electron -P always

# ..or the longer form:
quasar build --mode electron --publish always

Select electron-builder on the command line (--bundler builder) or in quasar.config at electron.bundler. The publish option only applies to electron-builder.

Valid values for -P are onTag, onTagOrDraft, always, and never. Configure a supported provider in quasar.config > electron > builder > publish; see the current electron-builder publishing documentation.

A very basic configuration to publish a Windows EXE setup file to Amazon S3 might look like this:

/quasar.config file

electron: {
  bundler: 'builder', // set here instead of using command line flag --bundler
  builder: {
    appId: 'com.electron.myelectronapp',
    win: {
      target: 'nsis'
    },
    publish: {
      provider: 's3',
      bucket: 'myS3bucket'
    }
  }
}