Easily Build Your Vue.js App For Desktop With Electron

Overview

Vue CLI Plugin Electron Builder

Easily Build Your Vue.js App For Desktop With Electron

Build status: Build status

Sponsor

Top Supporters

Glenn Frank
Glenn Frank

Quick Start:

Open a terminal in the directory of your app created with Vue-CLI 3 or 4 (4 is recommended).

Then, install and invoke the generator of vue-cli-plugin-electron-builder by running:

vue add electron-builder

That's It! You're ready to go!

To start a development server:

If you use Yarn (strongly recommended):

yarn electron:serve

or if you use NPM:

npm run electron:serve

To build your app:

With Yarn:

yarn electron:build

or with NPM:

npm run electron:build

To see more documentation, visit our website.

Supporters

Yves Hoppe durairajasivam Chris Hayes Andrew LeTourneau Kalila Lakeworth Ivorzk Eric Schirtzinger Alec Armbruster
Yves Hoppe durairajasivam Chris Hayes Andrew LeTourneau Kalila Lakeworth Ivorzk Eric Schirtzinger Alec Armbruster

Past Supporters

Mitch Dennet
Mary-Tyler-Moore Mitch Dennet
Issues
  • Electron isn't launching on serve:electron

    Electron isn't launching on serve:electron

    Some people have reported that serve:electron gets stuck on Launching Electron. This issue is created to centralize these reports.

    opened by nklayman 37
  • Errors retrieving paths, node-module externalization?

    Errors retrieving paths, node-module externalization?

    Describe the bug

    Hello! Thanks a lot to your for providing this plugin.

    I tried to migrate my project from electron-webpack to vue-cli-plugin-electron-builder cause HMR is broken in electron-webpack atm.

    I created a new project with vue cli and then merged the automatically created files with my project and deleted the unneccesary ones.

    When I run serve:electron, I get the error shown in the screenshot. Note that leveldown is a native dependency in my project and shouldnt be included in Webpack.

    image

    With electron-webpack, the "renderer.js" webpack file has 4,000 lines. With vue-cli-plugin-electron-builder, I get to 19,000 lines in "app.js"!

    I suspected that webpack didn't externalize the node-modules.

    So I then changed the vue.js.config to externalize all packages in my package.json by webpack (see below). Then, I get a strange path error. It seems to try to fetch modules from:

    "C:[appfolder]\node_modules\electron\dist\resources\default_app.asar\node_modules" "C:[appfolder]\node_modules\electron\dist\resources\node_modules" "C:[appfolder]\node_modules\electron\dist\resources\electron.asar\renderer\api\exports" and throws an error (cause package is located in "C:[appfolder]\node_modules")

    To summarize:

    • Something's wrong with the module externalization
    • Something's wrong with the path.

    Thanks a lot for your help.

    To Reproduce Steps to reproduce the behavior:

    • Add node-modules as webpack.externals
    • Check projects with native libraries

    Environment (please complete the following information):

    • OS and version: Win 10 x64 Prof
    • Node version: 8.11.4
    • npm version: recent
    • yarn version (if used): recent
    • other vue plugins used: "vue": "^2.5.17", "vue-async-computed": "^3.4.0", "vue-electron": "^1.0.6", "vue-router": "^3.0.1", "vue-shortkey": "^3.0.2", "vuedraggable": "^2.16.0", "vuetify": "^1.1.11" "@vue/cli-plugin-babel": "^3.0.0", "@vue/cli-plugin-eslint": "^3.0.0", "@vue/cli-plugin-unit-jest": "^3.0.0", "@vue/cli-service": "^3.0.0", "@vue/eslint-config-standard": "^3.0.0", "@vue/test-utils": "^1.0.0-beta.20", "vue-cli-plugin-electron-builder": "^1.0.0-beta.6", "vue-template-compiler": "^2.5.17",
    • custom config for vcp-electron-builder:
    var nodeExternals = require('webpack-node-externals');
    module.exports = {
      pluginOptions: {
        electronBuilder: {
          chainWebpackRendererProcess: config => {
            config.externals(nodeExternals(
              {
                modulesFromFile: true,
                whitelist: ['vue']
              }
            ))
            return config
          },
      }
    }
    }
    
    opened by lspohn 36
  • Electron 9.0.0, unable to install dev tools

    Electron 9.0.0, unable to install dev tools

    Describe the bug After upgrading to electron 9.0.0, the following error is thrown.

    (node:63292) ExtensionLoadWarning: Warnings loading extension at /Users/mimimi/Library/Application Support/PROJECTNAME/extensions/nhdogjmejiglipccpnnnanhbledajbpd: Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'update_url'. Permission 'contextMenus' is unknown or URL pattern is malformed. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.
    (node:63292) ExtensionLoadWarning: Warnings loading extension at /Users/mimimi/Library/Application Support/PROJECTNAME/extensions/nhdogjmejiglipccpnnnanhbledajbpd: Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'update_url'. Permission 'contextMenus' is unknown or URL pattern is malformed. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.
    

    To Reproduce Init a project and upgrade electron to 9.0.0

    Expected behavior The dev tool should be working

    Environment (please complete the following information):

    • OS and version: macOS 10.15.5
    • node version: v12.13.1
    • npm version:
    • yarn version (if used): 1.22.0
    • vue-cli-plugin-electron-builder version : commit f0c7709
    • electron version: 9.0.0
    • other vue plugins used: vuetify
    • custom config for vcp-electron-builder: none
    • (if possible) link to your repo: none
    opened by Meowzz95 35
  • Application entry file

    Application entry file "electron/bundled/background.js" in the "....app.asar" does not exist

    Describe the bug Looks like there is some misconfiguration happening with electron-builder

    To Reproduce Run the following:

    git clone git://github.com/osapps/dotsync
    cd dotsync
    yarn
    cd packages/app
    npm run electron:build
    

    Expected behavior Building should work

    Screenshots

    
     INFO  Building app with electron-builder:
      • electron-builder version=20.38.5
      • writing effective config file=electron/builder-effective-config.yaml
      • no native production dependencies
      • packaging       platform=darwin arch=x64 electron=3.1.3 appOutDir=electron/mac
      • default Electron icon is used reason=application icon is not set
     ERROR  Error: Application entry file "electron/bundled/background.js" in the "/Users/pksunkara/Coding/osapps/dotsync/packages/app/electron/mac/Dotsync.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.
    Error: Application entry file "electron/bundled/background.js" in the "/Users/pksunkara/Coding/osapps/dotsync/packages/app/electron/mac/Dotsync.app/Contents/Resources/app.asar" does not exist. Seems like a wrong configuration.
        at error (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/out/asar/asarFileChecker.js:44:14)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:30:4
    From previous event:
        at _checkFileInArchive (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/asar/asarFileChecker.ts:36:17)
        at checkFileInArchive (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/out/asar/asarFileChecker.js:40:30)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:409:13
        at Generator.next (<anonymous>)
    From previous event:
        at MacPackager.checkFileInPackage (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:406:110)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:460:16
        at Generator.next (<anonymous>)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/polyfills.js:285:20
        at FSReqWrap.oncomplete (fs.js:159:5)
    From previous event:
        at MacPackager.sanityCheckPackage (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:446:92)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:249:16
        at Generator.next (<anonymous>)
        at runCallback (timers.js:696:18)
        at tryOnImmediate (timers.js:667:5)
        at processImmediate (timers.js:649:5)
        at process.topLevelDomainCallback (domain.js:121:23)
    From previous event:
        at MacPackager.doPack (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/platformPackager.ts:167:165)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/macPackager.ts:88:63
        at Generator.next (<anonymous>)
    From previous event:
        at MacPackager.pack (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/macPackager.ts:80:95)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:430:24
        at Generator.next (<anonymous>)
        at xfs.stat (/Users/pksunkara/Coding/osapps/dotsync/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/polyfills.js:285:20
        at FSReqWrap.oncomplete (fs.js:159:5)
    From previous event:
        at Packager.doBuild (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:396:24)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:366:57
        at Generator.next (<anonymous>)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/graceful-fs.js:111:16
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/graceful-fs.js:45:10
        at FSReqWrap.oncomplete (fs.js:145:20)
    From previous event:
        at Packager._build (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:335:133)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:331:23
        at Generator.next (<anonymous>)
        at runCallback (timers.js:696:18)
        at tryOnImmediate (timers.js:667:5)
        at processImmediate (timers.js:649:5)
        at process.topLevelDomainCallback (domain.js:121:23)
    From previous event:
        at Packager.build (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/packager.ts:288:14)
        at build (/Users/pksunkara/Coding/osapps/dotsync/node_modules/app-builder-lib/src/index.ts:59:28)
        at Object.build (/Users/pksunkara/Coding/osapps/dotsync/node_modules/electron-builder/src/builder.ts:227:10)
        at buildApp (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/index.js:176:14)
        at bundle.run (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/index.js:158:15)
        at finalCallback (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:220:39)
        at hooks.done.callAsync.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:269:14)
        at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/pksunkara/Coding/osapps/dotsync/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
        at AsyncSeriesHook.lazyCompileHook (/Users/pksunkara/Coding/osapps/dotsync/node_modules/tapable/lib/Hook.js:154:20)
        at emitRecords.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:267:22)
        at Compiler.emitRecords (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:449:39)
        at emitAssets.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:261:10)
        at hooks.afterEmit.callAsync.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:435:14)
        at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/pksunkara/Coding/osapps/dotsync/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
        at AsyncSeriesHook.lazyCompileHook (/Users/pksunkara/Coding/osapps/dotsync/node_modules/tapable/lib/Hook.js:154:20)
        at asyncLib.forEachLimit.err (/Users/pksunkara/Coding/osapps/dotsync/node_modules/vue-cli-plugin-electron-builder/node_modules/webpack/lib/Compiler.js:432:27)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/neo-async/async.js:2813:7
        at done (/Users/pksunkara/Coding/osapps/dotsync/node_modules/neo-async/async.js:3521:9)
        at /Users/pksunkara/Coding/osapps/dotsync/node_modules/graceful-fs/graceful-fs.js:45:10
        at FSReqWrap.oncomplete (fs.js:145:20)
    

    Environment (please complete the following information):

    • OS and version: MacOS 10.13.1
    • node version: 10.6.0
    • npm version: 6.7.0
    • yarn version (if used): 1.12.3
    • vue-cli-plugin-electron-builder version : 1.0.0-rc.11
    • electron version: 3.1.3
    • other vue plugins used:
    • custom config for vcp-electron-builder:
    • (if possible) link to your repo: https://github.com/osapps/dotsync

    Additional context Add any other context about the problem here.

    opened by pksunkara 30
  • [Announcement] V2.0 beta stability poll

    [Announcement] V2.0 beta stability poll

    Hello everyone:wave:! I'm getting ready to move the 2.0 beta to RC (release candidate) status as it is long overdue, but I first want to make sure that there aren't any breaking changes requested. If you think that the 2.0 beta is ready for RC then please :+1: this issue. If not, please :-1: and leave a comment explaining why.

    Specifically, I'd like feedback on the following major changes:

    • Is the new spectron testing process preferred over the old one? Does anyone have any suggestions for improvement?
    • Does it make sense to disable node integration by default? This means that apps will likely be more secure, but native modules and other electron-provided functions will not work without configuring nodeIntegration.
    • Has it been stable for you? Are there any new bugs that have popped up?
    • Is the migration guide on the release announcement sufficient? Were there any additional changes you had to make? Did it all go smoothly?

    Thanks for all your feedback!

    opened by nklayman 28
  • Vue Devtools not loading

    Vue Devtools not loading

    Describe the bug After the first initial run when the devtools are still being loaded, they're not available anymore.

    When running npm run electron:serve I get this warning message:

    (node:16668) ExtensionLoadWarning: Warnings loading extension at C:\Users\oasch\AppData\Roaming\sealas-desktop\extensions\nhdogjmejiglipccpnnnanhbledajbpd: Unrecognized manifest key 'browser_action'. Unrecognized manifest key 'update_url'. Permission 'contextMenus' is unknown or URL pattern is malformed. Cannot load extension with file or directory name _metadata. Filenames starting with "_" are reserved for use by the system.
    

    Which is most likely coming from this line:

    await installExtension(VUEJS_DEVTOOLS)

    package.json:

    "vue-cli-plugin-electron-builder": "^2.0.0-rc.4",
    

    It seems possible to "fix" this by deleting the temporary build and forcing a rebuild.

    opened by DKhalil 27
  • Vue JS Dev Tools - Not detecting VUE DOM

    Vue JS Dev Tools - Not detecting VUE DOM

    Vue JS Dev Tools - installing but does not list elements When running yarn electron:serve - the VUE JS dev tools are not registering any elements as VUE. However the tools are installed.

    To Reproduce

    1. electron:serve
    2. The App launches
    3. Dev Tools installed but not working
    Screenshot 2019-05-08 at 11 13 14

    Expected behavior

    1. After running the same command with no code changes the VUE devtools then work this is random and far between ( Same app and code but successful build here )
    Screenshot 2019-05-08 at 11 22 44

    Package.json { "name": "com.electron", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", "electron:build": "vue-cli-service electron:build", "electron:serve": "vue-cli-service electron:serve", "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps", "test:e2e": "vue-cli-service test:e2e" }, "main": "background.js", "dependencies": { "client-oauth2": "^4.2.3", "core-js": "^2.6.5", "vue": "^2.6.10", "vue-router": "^3.0.6", "vuex": "^3.1.0" }, "devDependencies": { "@vue/cli-plugin-babel": "^3.7.0", "@vue/cli-plugin-e2e-cypress": "^3.7.0", "@vue/cli-plugin-eslint": "^3.7.0", "@vue/cli-service": "^3.7.0", "@vue/eslint-config-prettier": "^4.0.1", "babel-cli": "^6.26.0", "babel-eslint": "^10.0.1", "electron": "^5.0.0", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.0.0", "vue-cli-plugin-electron-builder": "^1.3.1", "vue-template-compiler": "^2.5.21", "webpack-cli": "^3.3.1" }, "eslintConfig": { "root": true, "env": { "node": true }, "extends": [ "plugin:vue/essential", "@vue/prettier" ], "rules": {}, "parserOptions": { "parser": "babel-eslint" } }, "postcss": { "plugins": { "autoprefixer": {} } }, "browserslist": [ "> 1%", "last 2 versions" ] }

    Additional context Not sure if the tools are trying to re install or there is a race condition before the browser loads? Or it might be silently failing?

    opened by jonathantizard 25
  • Electron 6.0.0+ does not launch in Windows 10 Dark Mode

    Electron 6.0.0+ does not launch in Windows 10 Dark Mode

    Describe the bug When using vue-cli-plugin-electron-builder with the Electron 6.0.0, it hangs and Electron is not launched if Windows 10's dark mode is enabled. It works fine in light mode.

    This is due to a bug introduced in [email protected] which causes Electron to hang on launch in Win10 dark mode if any dev tools extensions are installed. VCPEB installs Vue.js Devtools automatically, triggering this bug.

    To Reproduce Steps to reproduce the behaviour:

    1. Ensure Windows "choose your color" setting is set to "Dark".
    2. vue create test (accept all defaults)
    3. cd test
    4. vue add electron-builder (accept all defaults)
    5. npm i [email protected]
    6. npm run electron:serve

    Expected behaviour Electron should launch regardless of whether Windows is in Light or Dark mode.

    Environment

    • OS and version: Windows 10 Home 1903
    • node version: 12.7.0
    • npm version: 6.10.0
    • yarn version (if used): n/a
    • vue-cli-plugin-electron-builder version: 1.3.6
    • electron version: 6.0.0
    • other vue plugins used: none
    • custom config for vcp-electron-builder: none
    • (if possible) link to your repo: n/a

    Additional context See https://github.com/electron/electron/issues/19468 for the Electron bug which causes this issue.

    Workaround for now is to disable the automatic installation of Vue.js Devtools in background.js, and delete your app's data directory in %appdata% to remove already-installed devtools.

    opened by caesar 23
  • How to publish a vue-electron release to github using this plugin?

    How to publish a vue-electron release to github using this plugin?

    Helo friends,

    I have an electron application that uses autoUpdater, but I don't know how to release ...

    I have this in the background.js:

      const server = 'https://cinecoqui.chrismichael.now.sh'
      const feed = `${server}/update/${process.platform}/${app.getVersion()}`
    
      autoUpdater.setFeedURL(feed);
    
      setInterval(() => {
        autoUpdater.checkForUpdates()
      }, 60000);
    
      autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
        const dialogOpts = {
          type: 'info',
          buttons: ['Restart', 'Later'],
          title: 'Application Update',
          message: process.platform === 'win32' ? releaseNotes : releaseName,
          detail: 'A new version has been downloaded. Restart the application to apply the updates.'
        }
      
        dialog.showMessageBox(dialogOpts, (response) => {
          if (response === 0) autoUpdater.quitAndInstall()
        })
      })
    
      autoUpdater.on('error', message => {
        console.error('There was a problem updating the application')
        console.error(message)
      })
    

    When I write the

     npm run electron:build
    

    command it generates what is the dist_electron folder, next to the latest.yml file that have this:

    version: 1.1.0
    files:
      - url: cinecoqui-Setup-1.1.0.exe
        sha512: DNQh9JA/Ex2dNij3ZYNtKPXs1j9L+cHUFZR6xg2aSJkU6KglEAe6XBJMtc6UBtJIHaUXuAaZPrVmnBivJwEzrA==
        size: 43692738
    path: cinecoqui-Setup-1.1.0.exe
    sha512: DNQh9JA/Ex2dNij3ZYNtKPXs1j9L+cHUFZR6xg2aSJkU6KglEAe6XBJMtc6UBtJIHaUXuAaZPrVmnBivJwEzrA==
    releaseDate: '2019-09-26T15:06:02.912Z'
    
    

    Some help I will appreciate it

    opened by ChrisMichaelPerezSantiago 21
  • Not respecting build targets even though listed in builder-effective-config

    Not respecting build targets even though listed in builder-effective-config

    Electron is bundling for Mac and only for Mac, even though build options do not include a Mac target but only a single Windows target.

    While the autogenerated builder-effective-config.yaml is reflecting the build options correctly:

    directories:
      output: dist_electron
      buildResources: build
      app: dist_electron/bundled
    files:
      - filter:
          - dist_electron/**/*
          - src/background.js
          - background.js
    extends: null
    asar: true
    appId: com.XXX
    productName: XXX
    win:
      target:
        - nsis
      icon: build/icons/icon.ico
    electronVersion: 4.0.5
    

    Output getting from CLI:

     INFO  Building app with electron-builder:
      • electron-builder version=20.38.5
      • writing effective config file=dist_electron/builder-effective-config.yaml
      • no native production dependencies
      • packaging       platform=darwin arch=x64 electron=4.0.5 appOutDir=dist_electron/mac
      • skipped macOS application code signing reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=
    0 identities found
    Valid identities only
    0 valid identities found
      • building        target=macOS zip arch=x64 file=dist_electron/XXX-0.1.0-mac.zip
      • building        target=DMG arch=x64 file=dist_electron/XXX-0.1.0.dmg
      • building block map blockMapFile=dist_electron/XXX-0.1.0.dmg.blockmap
      • building embedded block map file=dist_electron/XXX-0.1.0-mac.zip
     DONE  Build complete!
    ✨  Done in 107.17s.
    

    Environment:

    • OS and version: macOS Mojave 10.14.3 (18D109)
    • node version: v10.15.0
    • yarn version: 1.13.0
    • vue-cli-plugin-electron-builder version : 1.0.1
    • electron version: 4.0.5
    • other vue plugins used:
        "@vue/cli-plugin-babel": "^3.4.0",
        "@vue/cli-plugin-e2e-cypress": "^3.4.0",
        "@vue/cli-plugin-eslint": "^3.4.0",
        "@vue/cli-plugin-pwa": "^3.4.0",
        "@vue/cli-plugin-typescript": "^3.4.0",
        "@vue/cli-plugin-unit-jest": "^3.4.0",
        "@vue/cli-service": "^3.4.0",
        "@vue/eslint-config-standard": "^4.0.0",
        "@vue/eslint-config-typescript": "^4.0.0",
        "@vue/test-utils": "^1.0.0-beta.20",
        "vue-class-component": "^6.3.2",
        "vue-cli-plugin-ant-design": "^1.0.0",
        "vue-cli-plugin-electron-builder": "^1.0.0",
        "vue-mixin-decorator": "^1.1.0",
        "vue-property-decorator": "^7.3.0",
        "vue-template-compiler": "^2.5.21",
        "vuex-class": "^0.3.1"
    
    • custom config for vcp-electron-builder:
      pluginOptions: {
        electronBuilder: {
          mainProcessFile: 'background.js',
          builderOptions: {
            asar: true,
            appId: 'com.XXX',
            productName: 'XXX',
            files: [
              'dist_electron/**/*',
              'src/background.js',
              'background.js'
            ],
            win: {
              target: [
                'nsis'
              ],
              icon: 'build/icons/icon.ico'
            }
          }
        }
      }
    
    opened by ux-engineer 21
  • __static not available

    __static not available

    Describe the bug I cant seem to access the variable __static in order to access my static assets.

    To Reproduce Steps to reproduce the behavior:

    • Create project using vue-cli
    • Add vue-cli plugin electron-builder

    Expected behavior __static should reference the path to the static assets.

    Screenshots image

    Environment (please complete the following information):

    • custom config for vcp-electron-builder:
    • (if possible) link to your repo:
    • terminal output from running vue info:
    System:
        OS: Windows 10 10.0.19042
        CPU: (8) x64 AMD Ryzen 5 2400G with Radeon Vega Graphics
      Binaries:
        Node: 15.4.0 - C:\Program Files\nodejs\versions\v15.4.0\node.EXE 
        Yarn: 1.22.10 - C:\Program Files\nodejs\versions\v15.4.0\yarn.CMD
        npm: 7.0.15 - C:\Program Files\nodejs\versions\v15.4.0\npm.CMD   
      Browsers:
        Chrome: 91.0.4472.124
        Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.55)
      npmPackages:
        @vue/babel-helper-vue-jsx-merge-props:  1.2.1
        @vue/babel-helper-vue-transform-on:  1.0.2
        @vue/babel-plugin-jsx:  1.0.6
        @vue/babel-plugin-transform-vue-jsx:  1.2.1
        @vue/babel-preset-app:  4.5.13
        @vue/babel-preset-jsx:  1.2.4
        @vue/babel-sugar-composition-api-inject-h:  1.2.1
        @vue/babel-sugar-composition-api-render-instance:  1.2.4
        @vue/babel-sugar-functional-vue:  1.2.2
        @vue/babel-sugar-inject-h:  1.2.2
        @vue/babel-sugar-v-model:  1.2.3
        @vue/babel-sugar-v-on:  1.2.3
        @vue/cli-overlay:  4.5.13
        @vue/cli-plugin-babel: ~4.5.0 => 4.5.13
        @vue/cli-plugin-eslint: ~4.5.0 => 4.5.13
        @vue/cli-plugin-router: ~4.5.0 => 4.5.13
        @vue/cli-plugin-vuex:  4.5.13
        @vue/cli-service: ~4.5.0 => 4.5.13
        @vue/cli-shared-utils:  4.5.13
        @vue/component-compiler-utils:  3.2.2
        @vue/eslint-config-prettier: ^6.0.0 => 6.0.0
        @vue/preload-webpack-plugin:  1.1.2
        @vue/web-component-wrapper:  1.3.0
        eslint-plugin-vue: ^6.2.2 => 6.2.2
        vue: ^2.6.11 => 2.6.14
        vue-cli-plugin-electron-builder: ~2.1.1 => 2.1.1
        vue-eslint-parser:  7.9.0
        vue-hot-reload-api:  2.3.4
        vue-loader:  15.9.6 (16.3.3)
        vue-router: ^3.2.0 => 3.5.2
        vue-style-loader:  4.1.3
        vue-template-compiler: ^2.6.11 => 2.6.14
        vue-template-es2015-compiler:  1.9.1
      npmGlobalPackages:
        @vue/cli: Not Found
    

    Additional context Add any other context about the problem here.

    opened by Matix-Media 0
  • I'm always frustrated when i use adonisJs framework with Vue CLI Plugin Electron Builder

    I'm always frustrated when i use adonisJs framework with Vue CLI Plugin Electron Builder

    i want to use Adonis Framework inside Electron Vue Plugin but doesn't work 2021-07-22_104624

    i have called server.js inside background.js to run the server but I get an error 2021-07-22_105208

    **this is the Error ** 2021-07-22_102226

    is there any other methods to run adonisJs with Same Project Please Help Me

    This is my project repo https://github.com/biloo-dev/electron_vue_Adonis.git

    opened by biloo-dev 0
  • Updating electron-devtools-installer to ^3.1.1

    Updating electron-devtools-installer to ^3.1.1

    Related issue: https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1469

    Related fix: https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/2577#issuecomment-730378777

    opened by aretw0 0
  • electron:build after not working the app

    electron:build after not working the app

    using "vue-cli-plugin-electron-builder": "~2.1.1" "electron": "^9.0.0",

    I am running "electron:build". It gets a build with no problem. After installing the .dmg file, the app won't open and "my application name quit unexpectedly." displays the error message

    note: does not work in applications compiled for windows.

    Thanks.

    opened by snapxtp 0
  • electron:serve can't go in main process

    electron:serve can't go in main process

    Describe the bug When I use npm run electron:serve and my project has a yarn.lock file, it will appear

    To Reproduce The project has 'yarn.lock, but computer didn't installyarn, and usenpm run electron:serve` to start project It will stuck at render process, not go to main process

    Expected behavior It don't have this effect

    Screenshots image

    Environment (please complete the following information):

    • custom config for vcp-electron-builder: v22.9.1
    • (if possible) link to your repo:
    • terminal output from running vue info:
    System:
        OS: Windows 10 10.0.18363
        CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
      Binaries:
        Node: 14.17.0 - D:\nodejs\node.EXE
        Yarn: 1.22.5 - ~\AppData\Roaming\npm\yarn.CMD
        npm: 7.15.0 - D:\nodejs\npm.CMD
      Browsers:
        Chrome: 91.0.4472.124
        Edge: Spartan (44.18362.449.0)
      npmPackages:
        @vue/babel-helper-vue-jsx-merge-props:  1.2.1
        @vue/babel-helper-vue-transform-on:  1.0.0-rc.2
        @vue/babel-plugin-jsx:  1.0.0-rc.3
        @vue/babel-plugin-transform-vue-jsx:  1.2.1
        @vue/babel-preset-app:  4.5.9
        @vue/babel-preset-jsx:  1.2.4
        @vue/babel-sugar-composition-api-inject-h:  1.2.1
        @vue/babel-sugar-composition-api-render-instance:  1.2.4
        @vue/babel-sugar-functional-vue:  1.2.2
        @vue/babel-sugar-inject-h:  1.2.2
        @vue/babel-sugar-v-model:  1.2.3
        @vue/babel-sugar-v-on:  1.2.3
        @vue/cli-overlay:  4.5.9
        @vue/cli-plugin-babel: ~4.5.0 => 4.5.9
        @vue/cli-plugin-eslint: ~4.5.0 => 4.5.9
        @vue/cli-plugin-router: ~4.5.0 => 4.5.9
        @vue/cli-plugin-vuex: ~4.5.0 => 4.5.9
        @vue/cli-service: ~4.5.0 => 4.5.9
        @vue/cli-shared-utils:  4.5.9
        @vue/component-compiler-utils:  3.2.0
        @vue/eslint-config-prettier: ^6.0.0 => 6.0.0
        @vue/preload-webpack-plugin:  1.1.2
        @vue/web-component-wrapper:  1.2.0
        babel-helper-vue-jsx-merge-props:  2.0.3
        eslint-plugin-vue: ^6.2.2 => 6.2.2
        vue: ^2.6.11 => 2.6.12
        vue-cli-plugin-electron-builder: ~2.0.0-rc.5 => 2.0.0-rc.5
        vue-clipboard2: ^0.3.1 => 0.3.1
        vue-eslint-parser:  7.1.1
        vue-hot-reload-api:  2.3.4
        vue-loader:  15.9.5 (16.2.0)
        vue-router: ^3.2.0 => 3.4.9
        vue-style-loader:  4.1.2
        vue-template-compiler: ^2.6.11 => 2.6.12
        vue-template-es2015-compiler:  1.9.1
        vuex: ^3.4.0 => 3.6.0
      npmGlobalPackages:
        @vue/cli: Not Found
    

    Additional context

    opened by klren0312 0
  • chore(deps-dev): bump eslint from 7.29.0 to 7.31.0

    chore(deps-dev): bump eslint from 7.29.0 to 7.31.0

    Bumps eslint from 7.29.0 to 7.31.0.

    Release notes

    Sourced from eslint's releases.

    v7.31.0

    • efdbb12 Upgrade: @​eslint/eslintrc to v0.4.3 (#14808) (Brandon Mills)
    • a96b05f Update: add end location to report in consistent-return (refs #12334) (#14798) (Nitin Kumar)
    • e0e8e30 Docs: update BUG_REPORT template (#14787) (Nitin Kumar)
    • 39115c8 Docs: provide more context to no-eq-null (#14801) (gfyoung)
    • 9a3c73c Docs: fix a broken link (#14790) (Sam Chen)
    • ddffa8a Update: Indicating the operator in question (#14764) (Paul Smith)
    • bba714c Update: Clarifying what changes need to be made in no-mixed-operators (#14765) (Paul Smith)
    • b0d22e3 Docs: Mention benefit of providing meta.docs.url (#14774) (Bryan Mishkin)
    • 000cc79 Sponsors: Sync README with website (ESLint Jenkins)
    • a6a7438 Chore: pin [email protected] (#14771) (Milos Djermanovic)

    v7.30.0

    • 5f74642 Chore: don't check Program.start in SourceCode#getComments (refs #14744) (#14748) (Milos Djermanovic)
    • 19a871a Docs: Suggest linting plugins for ESLint plugin developers (#14754) (Bryan Mishkin)
    • aa87329 Docs: fix broken links (#14756) (Sam Chen)
    • 278813a Docs: fix and add more examples for new-cap rule (fixes #12874) (#14725) (Nitin Kumar)
    • ed1da5d Update: ecmaVersion allows "latest" (#14720) (薛定谔的猫)
    • 104c0b5 Update: improve use-isnan rule to detect Number.NaN (fixes #14715) (#14718) (Nitin Kumar)
    • b08170b Update: Implement FlatConfigArray (refs #13481) (#14321) (Nicholas C. Zakas)
    • f113cdd Chore: upgrade eslint-plugin-eslint-plugin (#14738) (薛定谔的猫)
    • 1b8997a Docs: Fix getRulesMetaForResults link syntax (#14723) (Brandon Mills)
    • aada733 Docs: fix two broken links (#14726) (Sam Chen)
    • 8972529 Docs: Update README team and sponsors (ESLint Jenkins)
    Changelog

    Sourced from eslint's changelog.

    v7.31.0 - July 17, 2021

    • efdbb12 Upgrade: @​eslint/eslintrc to v0.4.3 (#14808) (Brandon Mills)
    • a96b05f Update: add end location to report in consistent-return (refs #12334) (#14798) (Nitin Kumar)
    • e0e8e30 Docs: update BUG_REPORT template (#14787) (Nitin Kumar)
    • 39115c8 Docs: provide more context to no-eq-null (#14801) (gfyoung)
    • 9a3c73c Docs: fix a broken link (#14790) (Sam Chen)
    • ddffa8a Update: Indicating the operator in question (#14764) (Paul Smith)
    • bba714c Update: Clarifying what changes need to be made in no-mixed-operators (#14765) (Paul Smith)
    • b0d22e3 Docs: Mention benefit of providing meta.docs.url (#14774) (Bryan Mishkin)
    • 000cc79 Sponsors: Sync README with website (ESLint Jenkins)
    • a6a7438 Chore: pin [email protected] (#14771) (Milos Djermanovic)

    v7.30.0 - July 2, 2021

    • 5f74642 Chore: don't check Program.start in SourceCode#getComments (refs #14744) (#14748) (Milos Djermanovic)
    • 19a871a Docs: Suggest linting plugins for ESLint plugin developers (#14754) (Bryan Mishkin)
    • aa87329 Docs: fix broken links (#14756) (Sam Chen)
    • 278813a Docs: fix and add more examples for new-cap rule (fixes #12874) (#14725) (Nitin Kumar)
    • ed1da5d Update: ecmaVersion allows "latest" (#14720) (薛定谔的猫)
    • 104c0b5 Update: improve use-isnan rule to detect Number.NaN (fixes #14715) (#14718) (Nitin Kumar)
    • b08170b Update: Implement FlatConfigArray (refs #13481) (#14321) (Nicholas C. Zakas)
    • f113cdd Chore: upgrade eslint-plugin-eslint-plugin (#14738) (薛定谔的猫)
    • 1b8997a Docs: Fix getRulesMetaForResults link syntax (#14723) (Brandon Mills)
    • aada733 Docs: fix two broken links (#14726) (Sam Chen)
    • 8972529 Docs: Update README team and sponsors (ESLint Jenkins)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • unable to use __dirname in typescript file even with nodeIntegration true

    unable to use __dirname in typescript file even with nodeIntegration true

    Problem I am using typescript and express which working perfectly fine with vue, but I want to use the fs module with path and when I use __dirname it resolves to dist_electron but I want to use the current directory where I am writing the code.

    I have written migrations in the SQL files which I am trying to access like following -

    const migrationDirectory = path.join(__dirname); migration directory is the same directory in which this code has been written but it gives the following error - file not found in dist_electron. - src/server/migrations init.sql file location - src/server/migrations/init.sql Environment: I am doing this in development mode, haven't built the production build yet. Using preload.js like following - module.exports = { pluginOptions: { electronBuilder: { nodeIntegration: true, externals: ['express','typeorm','sqlite','fs','path'], preload: 'src/server/index.ts', } } }

    tsconfig.json - { "compilerOptions": { "target": "esnext", "module": "esnext", "strict": true, "jsx": "preserve", "importHelpers": true, "moduleResolution": "node", "experimentalDecorators": true, "emitDecoratorMetadata": true, "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "sourceMap": true, "baseUrl": ".", "types": [ "webpack-env", "node" ], "paths": { "@/*": [ "src/*" ] }, "lib": [ "esnext", "dom", "dom.iterable", "scripthost" ] }, "include": [ "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx" ], "exclude": [ "node_modules", ] }

    Screenshot 2021-07-19 at 2 20 56 PM
    opened by amsanket22 1
  • chore(deps-dev): bump electron from 13.1.4 to 13.1.7

    chore(deps-dev): bump electron from 13.1.4 to 13.1.7

    Bumps electron from 13.1.4 to 13.1.7.

    Release notes

    Sourced from electron's releases.

    electron v13.1.7

    Release Notes for v13.1.7

    Fixes

    • Fixed requestFullscreen inside webview does not make the element take fullscreen. #29987 (Also in 12, 14)
    • Fixed a crash when calling the webContents.on('login') callback synchronously. #30091 (Also in 12, 14)
    • Fixed a possible renderer crash when using fsPromises.readFile. #29928
    • Fixed an issue where Electron would sometimes not honor the user-defined Downloads directory. #29968 (Also in 12, 14)
    • Fixed an issue where the traffic lights would get double-drawn when exiting fullscreen and adding a BrowserView on macOS. #30149 (Also in 14)
    • Fixed incorrect value of document.focus when opening multiple windows on macOS
      • fix key window status on mac when opening panels or using custom window switchers. #29234 (Also in 12, 14)
    • Fixed systemPreferences.getSystemColor returning colors missing alpha values. #30088 (Also in 14)

    Other Changes

    • Backported fix for 1216190. #30100 (Also in 12, 14)

    Documentation

    • Documentation changes: #30057

    electron v13.1.6

    Release Notes for v13.1.6

    Fixes

    • Fixed a potential crash when calling app.quit() on macOS. #29961 (Also in 14)
    • Fixed an issue where self.module.paths wouldn't work in Workers. #30013 (Also in 12, 14)
    • Fixed crash when clicking links with target=_blank from webview. #29951 (Also in 12, 14)
    • Fixed memory leak when creating notification on macOS. #30009 (Also in 14)
    • Fixed page title not being updated on child windows without navigation entries under nativeWindowOpen. #29958 (Also in 12, 14)

    Other Changes

    • Backported fix for 1090000. #29997

    electron v13.1.5

    Release Notes for v13.1.5

    Fixes

    • Fixed a hang when denying a window.open using setWindowOpenHandler when nativeWindowOpen: false. #29882 (Also in 12, 14)
    • Fixed an issue where dropdown menus did not work in DevTools when contextIsolation was enabled. #29885 (Also in 14)
    • Fixed an issue where request headers were cleared if the optional "requestHeaders" parameter was not included in the webRequest.onBeforeSendHeaders callback response object. #29836 (Also in 12, 14)
    • Fixed an issue where the setAlwaysOnTop value would sometimes not be preserved for child windows on macOS. #29956 (Also in 12, 14)
    • Fixed crashes on macOS when Geolocation was used. #29912 (Also in 14)

    Other Changes

    • Updated Chromium to 91.0.4472.124. #29774
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • electron-pos-printer not working

    electron-pos-printer not working

    Describe the bug electron-pos-printer not working in main or render process

    To Reproduce Steps to reproduce the behavior: npm install electron-pos-printer

    put the following; const {PosPrinter} = require("electron-pos-printer"); const path = require("path");

    const options = { preview: false, // Preview in window or print width: '170px', // width of content body margin: '0 0 0 0', // margin of content body copies: 1, // Number of copies to print printerName: 'XP-80C', // printerName: string, check with webContent.getPrinters() timeOutPerLine: 400, pageSize: { height: 301000, width: 71000 } // page size }

    const data = [ { type: 'image',
    path: path.join(__dirname, 'assets/banner.png'), // file path position: 'center', // position of image: 'left' | 'center' | 'right' width: '60px', // width of image in px; default: auto height: '60px', // width of image in px; default: 50 or '50px' },{ type: 'text', // 'text' | 'barCode' | 'qrCode' | 'image' | 'table value: 'SAMPLE HEADING', style: text-align:center;, css: {"font-weight": "700", "font-size": "18px"} },{ type: 'text', // 'text' | 'barCode' | 'qrCode' | 'image' | 'table' value: 'Secondary text', style: text-align:left;color: red;, css: {"text-decoration": "underline", "font-size": "10px"} },{ type: 'barCode', value: 'HB4587896', height: 12, // height of barcode, applicable only to bar and QR codes width: 1, // width of barcode, applicable only to bar and QR codes displayValue: true, // Display value below barcode fontsize: 8, },{ type: 'qrCode', value: 'https://github.com/Hubertformin/electron-pos-printer', height: 55, width: 55, style: 'margin: 10 20px 20 20px' },{ type: 'table', // style the table style: 'border: 1px solid #ddd', // list of the columns to be rendered in the table header tableHeader: ['Animal', 'Age'], // multi dimensional array depicting the rows and columns of the table body tableBody: [ ['Cat', 2], ['Dog', 4], ['Horse', 12], ['Pig', 4], ], // list of columns to be rendered in the table footer tableFooter: ['Animal', 'Age'], // custom style for the table header tableHeaderStyle: 'background-color: #000; color: white;', // custom style for the table body tableBodyStyle: 'border: 0.5px solid #ddd', // custom style for the table footer tableFooterStyle: 'background-color: #000; color: white;', },{ type: 'table', style: 'border: 1px solid #ddd', // style the table // list of the columns to be rendered in the table header tableHeader: [{type: 'text', value: 'Animal'}, {type: 'image', path: path.join(__dirname, 'icons/animal.png')}], // multi dimensional array depicting the rows and columns of the table body tableBody: [ [{type: 'text', value: 'Cat'}, {type: 'image', path: './animals/cat.jpg'}], [{type: 'text', value: 'Dog'}, {type: 'image', path: './animals/dog.jpg'}], [{type: 'text', value: 'Horse'}, {type: 'image', path: './animals/horse.jpg'}], [{type: 'text', value: 'Pig'}, {type: 'image', path: './animals/pig.jpg'}], ], // list of columns to be rendered in the table footer tableFooter: [{type: 'text', value: 'Animal'}, 'Image'], // custom style for the table header tableHeaderStyle: 'background-color: #000; color: white;', // custom style for the table body tableBodyStyle: 'border: 0.5px solid #ddd', // custom style for the table footer tableFooterStyle: 'background-color: #000; color: white;', }, ]

    PosPrinter.print(data, options) .then(() => {}) .catch((error) => { console.error(error); });

    import the code in app.vue or anyother page and on click call this function

    Expected behavior A clear and concise description of what you expected to happen. should print directly to the printer

    opened by HuNtErX6969 0
  • chore(deps): bump webpack from 4.46.0 to 5.44.0

    chore(deps): bump webpack from 4.46.0 to 5.44.0

    Bumps webpack from 4.46.0 to 5.44.0.

    Release notes

    Sourced from webpack's releases.

    v5.44.0

    Features

    • add support for output.module + optimization.runtimeChunk

    Bugfixes

    • fix inline externals with dash in type

    v5.43.0

    Features

    • support runtime: false in entry description to disable runtime chunk
    • support runtime option in ModuleFederationPlugin and ContainerPlugin

    Bugfixes

    • fix "module" externals when concatenated

    Performance

    • serialize JSON data as buffer and parse on demand for performance and to avoid performance warning

    v5.42.1

    Bugfixes

    • fix crashes when rebuilding with jsonData or dataUrl of undefined

    v5.42.0

    Features

    • add cache compression via cache.compression
    • enable cache compression by default for non-development modes

    Bugfixes

    • add node-commonjs to schema for externalsType
    • update acorn to fix problems with top level await
    • fix regression for system externals

    Performance

    • fix a memory leak in the unsafe cache

    v5.41.1

    Bugfixes

    • add missing types about experimental esm support to schema
    • avoid slicing large Buffers as that doesn't always work for unknown reasons

    ... (truncated)

    Commits
    • f20158d 5.44.0
    • 740cdc4 Merge pull request #13757 from webpack/feature/module-runtime-chunk
    • 77ed504 add support for import chunk loading with runtime chunk
    • 1bb0db3 Merge pull request #13750 from webpack/ci/memory-problems
    • 4e9bcd1 make test cases to complete within tests
    • 8e2426e cleanup more test suite context variables
    • 5696931 log heap usage
    • 78e9a00 Merge pull request #13729 from webpack/ci/memory-problems
    • b171a15 Merge pull request #13745 from webpack/bugfix/node-commonjs
    • dadddb1 more memory again
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(v2.0.0)
  • v2.0.0(May 9, 2021)

    This release has been long overdue and this plugin has been in the RC state for way too long, sorry for the delay. Anyways, better late than never, so here it is! If you were running the latest RC previously, there aren't any breaking changes or required migration steps. Thank you to all my supporters who have funded this project and made this release possible :heart::heart:!!

    Breaking Changes from v1.x

    A few major deps were upgraded:

    • teser-webpack-plugin ^1.1.0 -> ^2.0.0
    • webpack-chain ^5.0.0 -> ^6.0.0
    • execa: ^1.0.0 -> ^4.0.0
    • electron-builder: ^21.2.0 -> 22.2.0

    These upgrades may cause breaking changes depending on your specific application.

    The internal tests are now run on vue cli v4, and it is recommended that you update your app to vue cli v4 as well.

    Fixes and Features

    • Support latest electron versions
    • nodeIntegration is now optional (and disabled by default), #610
    • electron-builder will now work on macos catalina, #617
    • You can now use the proper spectron version, #467
    • Removed fonts duplication in build, #694
    • You can now bundle preload files with webpack (docs), #613
    • New native dep checker, try it out now! (#861)
    • Vue devtools enabled by default on Electron v8/9 (#378)
    • Support package.json without dependencies field (#828)
    • Support electron being listed in dependencies as well as devDependencies (#829)
    • Support nested pages (#786)
    • And a lot more smaller fixes

    Migrating a v1.x Project:

    1. Run (yarn add | npm install) -D [email protected] to install the 2.0 version of the plugin.
    2. In your background.(js|ts), replace nodeIntegration:true with:
    // Use pluginOptions.nodeIntegration, leave this alone 
    // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info 
       nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION 
    
    1. If your app requires nodeIntegration, enable it in vue.config.js:
    module.exports = {
      pluginOptions: {
        electronBuilder: {
          nodeIntegration: true
        }
      }
    }
    
    1. If you used the testWithSpectron function, install the proper version of spectron according to the version map, and pass the spectron import at the first argument of all of your testWithSpectron calls. See the docs for more details.
    2. If you used jest, set the test environment to node in each electron test file. See the docs for more details.
    3. Update your main process file (src/background.js by default) to use electron-devtools-installer:
    import {
      createProtocol,
    - installVueDevtools
    } from 'vue-cli-plugin-electron-builder/lib'
    + import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
    
    ... (around line 77)
    
    -await installVueDevtools()
    +await installExtension(VUEJS_DEVTOOLS)
    

    And then run npm i -D electron-devtools-installer/yarn add -D electron-devtools-installer.

    After following these steps, your project should be good to go with v2.0!

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.4(Jun 29, 2020)

    From now on, whenever you add this plugin to your project, electron-devtools-installer will be used instead of the provided installVueDevtools function. This function was based off of electron-devtools-installer but with some fixes. These fixes have since been merged into electron-devtools-installer (as well as new features like electron v9 support). It is recommended that you switch to electron-devtools-installer as the installVueDevtools function will be removed in the 2.0.0 final release. To do so, edit your background.(js|ts):

    import {
      createProtocol,
    - installVueDevtools
    } from 'vue-cli-plugin-electron-builder/lib'
    + import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
    
    ... (around line 77)
    
    -await installVueDevtools()
    +await installExtension(VUEJS_DEVTOOLS)
    

    And then run npm i -D electron-devtools-installer/yarn add -D electron-devtools-installer.

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.3(Jun 24, 2020)

    Features:

    • New native dep checker, try it out now! (#861)
    • Vue devtools enabled by default on Electron v8/9 (#378)

    Fixes:

    • Support package.json without dependencies field (#828)
    • Support electron being listed in dependencies as well as devDependencies (#829)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.2(Jun 13, 2020)

    This release contains a handful of fixes:

    • Static assets from public folder wouldn't load due to incorrect process.env.BASE_URL (#803)
    • Type error in background.ts related to process.env.NODE_INTEGRATION (#801)
    • Support nested pages (#786)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.1(May 31, 2020)

    Breaking Changes

    • The testWithSpectron function requires you pass the spectron module as it's first arg, allowing you to specify the version of spectron to be used. You will need to install spectron as a devDependency
    • Jest tests must be run with testEnvironment set to node, see the examples for more details
    • Node integration is disabled by default

    A few major deps were upgraded:

    • teser-webpack-plugin ^1.1.0 -> ^2.0.0
    • webpack-chain ^5.0.0 -> ^6.0.0
    • execa: ^1.0.0 -> ^4.0.0
    • electron-builder: ^21.2.0 -> 22.2.0

    These upgrades may cause breaking changes depending on your specific application.

    The internal tests are now run on vue cli v4, and it is recommended that you update your app to vue cli v4 as well.

    Fixes and Features

    • Support electron v7 (+ v8 and v9), #555
    • nodeIntegration is now optional (and disabled by default), #610
    • electron-builder will now work on macos catalina, #617
    • You can now use the proper spectron version, #467
    • Removed fonts duplication in build, #694
    • You can now bundle preload files with webpack (docs), #613

    Migrating a v1.x Project:

    1. Run (yarn add | npm install) -D [email protected] to install the 2.0 version of the plugin.
    2. In your background.(js|ts), replace nodeIntegration:true with:
    // Use pluginOptions.nodeIntegration, leave this alone 
    // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info 
       nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION 
    
    1. If your app requires nodeIntegration, enable it in vue.config.js:
    module.exports = {
      pluginOptions: {
        electronBuilder: {
          nodeIntegration: true
        }
      }
    }
    
    1. If you used the testWithSpectron function, install the proper version of spectron according to the version map, and pass the spectron import at the first argument of all of your testWithSpectron calls. See the docs for more details.
    2. If you used jest, set the test environment to node in each electron test file. See the docs for more details.
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-beta.0(Jan 9, 2020)

    Breaking changes

    • The testWithSpectron function requires you pass the spectron module as it's first arg, allowing you to specify the version of spectron to be used. You will need to install spectron as a devDependency
    • Jest tests must be run with testEnvironment set to node, see the examples for more details
    • Node integration is disabled by default

    A few major deps were upgraded: teser-webpack-plugin ^1.1.0 -> ^2.0.0 webpack-chain ^5.0.0 -> ^6.0.0 execa: ^1.0.0 -> ^3.0.0 electron-builder: ^21.2.0 -> 22.2.0

    These upgrades may cause breaking changes depending on your specific application.

    The internal tests are now run on vue cli v4, and it is recommended that you update your app to vue cli v4 as well.

    Fixes and Features

    • Support electron v7, #555
    • nodeIntegration is now optional, #610
    • electron-builder will now work on macos catalina, #617
    • You can now use the proper spectron version, #467
    • Removed fonts duplication in build, #694

    Known Issues

    • #647: stopServe() in testWithSpectron() may throw setTimeout(...).unref is not a function

    Migrating a v1.x project:

    1. In your background.(js|ts), replace nodeIntegration:true with:
    // Use pluginOptions.nodeIntegration, leave this alone 
    // See https://github.com/nklayman/vue-cli-plugin-electron-builder/blob/v2/docs/guide/configuration.md#node-integration for more info 
       nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION 
    
    1. If your app requires nodeIntegration, enable it in vue.config.js:
    module.exports = {
      pluginOptions: {
        electronBuilder: {
          nodeIntegration: true
        }
      }
    }
    
    1. If you used the testWithSpectron function, install the proper version of spectron according to the version map, and pass the spectron import at the first argument of all of your testWithSpectron calls. See the docs for more details.
    2. If you used jest, set the test environment to node in each electron test file. See the docs for more details.
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Aug 3, 2019)

  • v1.3.0(Apr 25, 2019)

    Features:

    • Support for electron 5.0 (#250, 34e80e1168c5fc11472fb8d8f5599519e5ba0a0c)
    • Use chokidar for main process file watching to support directory watching (#247, 7e3505b1ef4394a042e3d1b9c2cccb3d74d4effa)

    Thanks to @Akryum for the Chokidar PR!

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Apr 25, 2019)

    With this release, non external deps will not be included in your built app to reduce it's size.

    Features:

    • Only include external deps (#223, cd3d9ab413d52a80ea85c8e1ef68fe7482387aae) Fixes:
    • rebuild background on change when in debug mode (fb5131374c7114564d1c069adb4c823fd663a517)
    • multi page configuration using objects fixed (2af978aa244ed848e76804078c456ae827bb19cd)
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Feb 28, 2019)

    With this release, only the modern build is run when building for production (requires @vue/cli-service v3.4.1). Previously, both the legacy and the modern build had to be run, even though the legacy build is never used. It also includes a few bug fixes (check the commit log for more details).

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Feb 10, 2019)

    After closing 163 issues, writing thousands of lines of code across 251 commits, and spending countless hours in front of a computer, 1.0.0 is finally here! We now have 0 open issues (not sure how long that will last :thinking:), a pretty good sign of stability :+1:. This release includes a few features as well:

    Features:

    • Mocha tests will be added when plugin is installed (#128, e99bba0f056b2b970b9508c3474163d24f79b778)
    • You can now use a custom file protocol with the customFileProtocol configuration option (#183, 3bf42d47c8ca4e195dbd216f4a062d1fc1715934)

    Thanks to everyone who clicked that :star: (we're almost at 500!!!), reported an issue, requested a feature, or made a PR (extra thanks)!

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.11(Feb 5, 2019)

    This release include a fix with the latest version of vue-cli (publicPath and baseUrl), as well as some other fixes and features.

    Features:

    • Command line args are now passed to electron in electron:serve (#185, 0e2b395cc261237135099e77110e501519f609c0)
    • process.env.IS_ELECTRON is now set accordingly (#181, 346701f3252b04a765d52523eee902469f07839d)

    Bug Fixes:

    • Broken vue cli ui pages are now removed (#48, 793805e5c5eb11c46ddcfddf995a60a0d37bd616)
    • electron:build now works properly with vue-cli 3.3.0 (#177, 28b5be002b1f719f02a4c5f9b4e0cc99c44acd78)
    • electron-builder install-app-deps is now run on postuninstall as well as postinstall (#168, f9f8b470479dc2671ad149a809abce7322d308e2)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.10(Dec 22, 2018)

    With 1.0.0-rc.10, electron ^4.0.0 will be available for use when invoking the generator, and ^3.0.0 will be the default. Internally (for testing), electron v4 is used, along with spectron v5. The background.js no longer relies on process.env.NODE_ENV to determine whether to load from the dev server or from the packaged app (#164).

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.9(Nov 27, 2018)

  • v1.0.0-rc.8(Nov 11, 2018)

    Features:

    • If your project uses Jest, you will be prompted to set up a Spectron test when adding this plugin (#128, 57895c78a2f5da39a26f0ab0ad6dbaad6e950e24)

    Bug fixes:

    • The app protocol is used to load index.html, fixes some CORS issues (#129, 8dc5bbabeca7185abd0ee93864e814ee313804fa)
    • --dashboard is now removed from electron-builder args, so builds started with the CLI UI will work (https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/48#issuecomment-434621628, d122fe60330832f7c8368fb36d5e34edd1d65df0)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.7(Oct 26, 2018)

  • v1.0.0-rc.5(Oct 26, 2018)

    This release includes a hotfix for #117, where Electron v3 would only display a blank screen. It also removes the need of the <base> tag in the index.html. After updating, remove that line, and your app will continue to work as normal.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.4(Oct 18, 2018)

    Breaking Changes

    Yes, I know it is in RC phase, but these needed to happen before the final release.

    This release changes the command names! Before: yarn (serve|build):electron After: yarn electron:(serve|build) This was changed to make it match other Vue CLI Plugins, see #94 for more info.

    You MUST re-invoke the generator if you upgrade to this version. To do so, run vue invoke electron-builder. This is caused because: Previously, your app would be packaged relative to the project's root. Since your built code is placed in dist_electron/bundled, __dirname in a built app would be [path-to-install]/resources/app.asar/dist_electron/bundled/. Now, it is packaged relative to dist_electron/bundled. In a built app, __dirname would be [path-to-install]/resources/app.asar/. __static and process.env.BASE_URL will still function the same.

    Features

    • You can now choose your desired Electron version when adding this plugin (ec4836908078cdbe03980058335e0c8cea14562e)
    • CLI output is prettier, and errors when bundling the main process are friendlier (#105, 61510e717860a9cbe58842e157f8d42efb472dc4)
    • Custom electron args are now supported (#93, b45b2ef24151a56d20dd4aa6c9074be825d04575) thanks @zdevwu
    • The output dir can be set with --dest, and changing it no longer requires you to set the main property of your package.json (7e4afa689effb6a4fac999a656f54a52ae44beba)
    • Environment variables prefixed with VUE_APP_ can now be accessed in the main process (#83, 23ff11be10a725af00e77f474494e397f3f2de4d)

    Bug Fixes

    • Electron is killed gracefully during development (#110, ed0bcb8e517500fd31bd6a23f9ae38b27da9f474) Huge thanks to @Desuuuu
    • Entry name is now used as output file. This makes it easier to add files to the main process bundling (#106, dc9940b5a13de955f46d1a380e739bb576c0c202)
    • The installation process of VueJS devtools now supports a dynamically set userData path (83229ec573a8a8c8eb4589db51384e9406bcf1f0)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.3(Sep 8, 2018)

    12 issues have been closed since the last release :tada:! This means a lot of small features/fixes.

    A few new features

    • Electron's junk output is now stripped from the terminal (#60, da4033e85f64df135bedc320c2812325d0eb046c)
    • --skipBundle only runs electron-builder, skipping all bundling (#70, 368a9e4ab66ad20770611aa724ea42d0d1a261a0)
    • --legacy disables modern mode while bundling the renderer process (#71, 368a9e4ab66ad20770611aa724ea42d0d1a261a0)
    • Add support for custom node_modules folder path when detecting externals (#75, 4cb68866da88778edf1ab77e86bc1e44dd7e8554)

    And, the bug fixes

    • Support not having a css folder inside dist_electron/bundled (#64, e3cb7cb2e757e0fdaff8f64f596c8a883245be20)
    • Fixes electron not detecting app's product name (#74, 6c76898874035f98d9160d1f01a8eb2f8fc18244)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.2(Aug 27, 2018)

    This release adds a small fix for native modules. Before, if a native module had an index.js it would be marked as not external whether or not the user listed it as an external or other checks marked it as one. (#57, 4df3aeb63d67034b0597d55382277bee67d14826)

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-rc.1(Aug 24, 2018)

    I am now able to move VCP-Electron-Builder into release candidate stage :tada: as I fixed two of it's major issues:

    • Native modules support (#51, fb684b99f2e0a395463c6e052e95d9db914916a3, docs)
    • Latest vue-cli-service support (c068159eebe903989c0c8955b0843d568a1918d6)

    To upgrade, you will only need to re-invoke the generator (vue invoke electron-builder) if you need native modules support. Thanks to the smart generator (d4d55c67813b2790fe1b3d3e415e36b58e9c38ff), only missing code will be added and the rest will be left alone.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta.7(Aug 17, 2018)

    This is a small release, containing a few bug fixes:

    • Custom main process watchlist for electron restart (#45, e4d27aea8cb0370da91a952bbdb4f717ea08346f)
    • only one electron install/missing dep for testWithSpectron (084aba79d560eccb187c0325c5e4d3601c73859b)
    • allow using --mode argument (https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/31#issuecomment-413963639, 79a1be9b04f5adf442b233dc1486eeebb9179275)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta.6(Jul 23, 2018)

    This release has 2 new bug fixes:

    • The generator now supports not having a gitignore file (#36, 0730bc79f09a480c9e7582d64fe5d5897f0c590f)
    • JS files are resolved properly in typescript (#34, 89349687ee93d11831403191aeff9d56b0f7b4be)

    Also, whenever your main process file is changed, Electron will be closed, the main process file rebundled, and Electron will be relaunched.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta.5(Jul 7, 2018)

  • v1.0.0-beta.4(Jul 7, 2018)

    First of all, I'd like to thank @bdiz and @u3u for the feature requests.

    Second, we have a new website (powered by VuePress)! Check it out at https://nklayman.github.io/vue-cli-plugin-electron-builder/.

    Last but not least, this release has a few new handy features:

    • Testing and debugging support. Read about how it works here
    • Vue modes (.env vars) are now supported
    • You can now customize the renderer process webpack config (docs)
    • Lodash deep merging is now used to prevent accidental default config overrides.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta.3(Jul 1, 2018)

    When I renamed the branch to master, it broke the url for the custom vue-cli-service :(. in beta 2 I made a typo for the url, and beta 3 is the only beta that doesn't break on install. Also, it appears yarn has install issues regardless.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-beta.1(Jul 1, 2018)

    With v1.0.0-beta.1, v1 is the default version of vue-cli-plugin-electron-builder🎉. While there are hardly any new features, it has near 100% test coverage (just missing ui interface and error logging). Thanks for all of your help reporting issues and requesting features! To upgrade from <=0.3.2, follow the upgrading guide. If you are upgrading from the v1.0.0-alpha, just update the version in your package.json, no need to re-invoke the generator.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0-alpha.11(Jun 26, 2018)

  • v1.0.0-alpha.10(Jun 25, 2018)

  • v1.0.0-alpha.9(Jun 22, 2018)

Owner
Noah Klayman
Full stack developer, open source maintainer, and high school student.
Noah Klayman
Vue Cli 3 Cordova Plugin

vue-cli-plugin-cordova Vue CLI 3.x plugin for Apache Cordova. Integrate Cordova into Vue Cli App How To Create Vue App $ npm install -g @vue/cli $ vue

null 397 Jul 20, 2021
A plugin that helps you bootstrap your Vue application by doing some common configurations.

Vue CLI Plugin Clean A Vue 2.x plugin that helps you bootstrap your application by performing some common configurations. Table of Contents Features G

Miguel Manjarres 18 Jun 12, 2021
Use Vite Today, with vue-cli

Use Vite Today out-of-box for vue-cli projects without any codebase modifications. Table of Contents Usage Motivation Options Underlying principle Com

PENG Rui 280 Jul 24, 2021
vue-cli plugin that adds minimal docker deployment using nginx

vue-cli-plugin-docker-nginx having a node container running an express server seemed kind of overkill for serving a built vue-app This is a vue-cli-pl

Sebastian Boolean 13 Mar 26, 2021
🛠️ vue-cli 3 plugin to create component

vue-cli-plugin-component component plugin for vue-cli project │ README.md │ LICENSE (optional) └───src │ ├── index.js │ └───components │

David Desmaisons 88 Jun 25, 2021
vue-cli3 plugin mock

vue-cli-plugin-mock A package for local mock data functionality Simple writing(Express.js style) watch file change auto reload mock server support esm

XuXiHai 26 Jun 24, 2021
Quickly build an enterprise application with vue-cli and element-ui in seconds.

vue-cli-plugin-element Quickly build an enterprise application with vue-cli and element-ui in seconds. This project is not only a vue-cli plugin but a

null 20 Oct 16, 2020
CodeceptJS plugin for Vue CLI

vue-cli-plugin-e2e-codeceptjs Hey, how about some end 2 end testing for your Vue apps? ?? Let's do it together! Vue, me, CodeceptJS & Puppeteer. ?? Br

CodeceptJS 13 Dec 12, 2020