V3 Alpha!
Pre-release
Pre-release
I'm happy to announce the first alpha of v3 is here! This release mainly updates all dependencies and cleans up some legacy code. There are no docs yet and this hasn't been tested thoroughly so be careful when using this in production. Please give me feedback and issue reports so I can promote this to stable ASAP.
Key Features/Fixes
- Latest Electron versions are now supported in the generator
- Spectron is dropped in favor of Playwright which should provide a much better testing experience
- Webpack 5 is now used for the main process
- New native dependency checker is enabled by default (#861)
- A more secure custom protocol implementation is used that prevents path traversal (thanks to https://github.com/moloch--/reasonably-secure-electron for code)
Upgrading/Breaking Changes
- Install this version with
vue add electron-builder@alpha
- Using Vue CLI v5 is recommended
- Remove the
main
field from yourpackage.json
- Make sure your custom main process webpack config works with webpack v5
background.js
shouldn't require any changes, but you can remove theenableRemoteModule
setting for Spectron if it's there- Migrate from Spectron to Playwright:
testWithSpectron
has been renamed totestWithPlaywright
, and doesn't take the Spectron import as an arg. The returnedapp
is now a Playwright ElectronApplication instead of a Spectron instance, andstopServe
has been renamed tostop
. You don't need to install Playwright, it's a dependency of this plugin. - In theory, everything else should continue to work as before, open an issue if it doesn't
TODO
- Support Mocha for testing (only Jest is supported for now)
- Update internal testing
- Update docs