Easily Build Your Vue.js App For Desktop With Electron
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).
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:
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)!
This release include a fix with the latest version of vue-cli (publicPath and baseUrl), as well as some other fixes and features.
Features:
electron:serve
(#185, 0e2b395cc261237135099e77110e501519f609c0)process.env.IS_ELECTRON
is now set accordingly (#181, 346701f3252b04a765d52523eee902469f07839d)Bug Fixes:
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)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).
This release removes use of flatmap-stream
, which contains a major security vulnerability, used in event-stream. Also, make sure you read this message and follow the instructions there!
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)These releases fix #117, where installVueDevtools()
would not return a promise. If you are using electron@^3.0.0
, it is recommended that you upgrade. You do not need to re-invoke the generator.
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.
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.
--dest
, and changing it no longer requires you to set the main
property of your package.json
(7e4afa689effb6a4fac999a656f54a52ae44beba)VUE_APP_
can now be accessed in the main process (#83, 23ff11be10a725af00e77f474494e397f3f2de4d)userData
path (83229ec573a8a8c8eb4589db51384e9406bcf1f0)12 issues have been closed since the last release :tada:! This means a lot of small features/fixes.
--skipBundle
only runs electron-builder, skipping all bundling (#70, 368a9e4ab66ad20770611aa724ea42d0d1a261a0)--legacy
disables modern mode while bundling the renderer process (#71, 368a9e4ab66ad20770611aa724ea42d0d1a261a0)node_modules
folder path when detecting externals (#75, 4cb68866da88778edf1ab77e86bc1e44dd7e8554)css
folder inside dist_electron/bundled
(#64, e3cb7cb2e757e0fdaff8f64f596c8a883245be20)