This guide is for upgrading from <=v0.3.2 to >=v1.0.0.
- Re-invoke the generator for vue-cli-plugin-electron-builder by running
vue invoke electron-builder. Make sure to update the package before running.
- You may delete
src/main/index.js. If you have modified it, those modifications must be moved to
src/background.jsafter re-invoking the generator.
- You may delete any electron-webpack config options, they will not be used. By default, they are in
electronWebpack. Instead, your regular app's config is extended.
- You may delete any electron-builderconfig options, they will not be used. By default, they are in
build. Any changes that you have made to these must be moved to plugin options.
- You may remove
webpackMainConfigfrom vue-cli-plugin-electron-builder's plugin options. Webpack config for the renderer process is your normal webpack config, and you can use the
chainWebpackMainProcessfunction to customize the main process webpack config. If you need to customize the renderer process, use the
- You may remove
electron-builder, and, if used,
electron-webpack-tsfrom your devDependencies. You may also remove
source-map-supportfrom your dependencies.
What has changed
- Electron-webpack is no longer used. Instead, your app is built as normal (but with some slight configuration changes).
- This means there is no need to change your config to work with stylus, sass, or any other special files.
- The commands have been renamed from
- Typescript support is automatic for both processes, just add the
- Your normal build will not be overwritten by
- The folder structure has changed dramatically.
- Electron-builder's config is now taken from the
builderOptionskey in vue-cli-plugin-electron-builder's plugin options.
- To learn more about the internals of this plugin, see how it works.