You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

nuxt-electron

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-electron

Nuxt Integration with Electron

0.4.0
Source
npmnpm
Version published
Weekly downloads
319
-25.12%
Maintainers
1
Weekly downloads
 
Created
Source

Nuxt Electron

Integrate Nuxt and Electron

NPM version NPM Downloads

screenshort.png

Features

  • 🚀 High-performance (Not Bundle, based on esbuild)
  • 📦 Out of the box
  • 🔥 Hot restart

Quick Setup

  • Add the following dependency to your project
npm i -D nuxt-electron vite-electron-plugin electron electron-builder
  • Add nuxt-electron to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    ['nuxt-electron'],
  ],
})

That's it! You can now use Electron in your Nuxt app ✨

Recommend structure

Let's use the official nuxt-starter-v3 template as an example

+ ├─┬ electron
+ │ └── main.ts
  ├─┬ public
  │ └── favicon.ico
  ├── .gitignore
  ├── .npmrc
  ├── index.html
  ├── app.vue
  ├── nuxt.config.ts
  ├── package.json
  ├── README.md
  └── tsconfig.json

ElectronOptions

This is based on the vite-electron-plugin, see the Documents for more detailed options

Here is the default nuxt-electron options

import type { ElectronOptions } from 'nuxt-electron'

export default defineNuxtConfig({
  modules: [
    ['nuxt-electron', <ElectronOptions>{
      include: ['electron'],
      outDir: 'dist-electron',
    }],
  ],
})

Examples

Notes

By default, we force the App to run in SPA mode since we don't need SSR for desktop apps

Keywords

nuxt

FAQs

Package last updated on 15 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts