Skip to content

Commit 7f0c00f

Browse files
committed
create upgrade guide
1 parent cec5904 commit 7f0c00f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

UPGRADING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Upgrading
2+
3+
**Note: This guide is for upgrading from <=v0.3.2 to >=v1.0.0.**
4+
5+
## Steps:
6+
7+
1. Re-invoke the generator for vue-cli-plugin-electron-builder by running `vue invoke electron-builder`. Make sure to update the package before running.
8+
2. You may delete `src/main/index.js`. If you have modified it, those modifications must be moved to `src/background.js` after re-invoking the generator.
9+
3. You may delete any electron-webpack config options, they will not be used. By default, they are in `package.json` under `electronWebpack`.
10+
4. You may delete any electron-builderconfig options, they will not be used. By default, they are in `package.json` under `build`. Any changes that you have made to these must be [moved to plugin options](https://github.com/nklayman/vue-cli-plugin-electron-builder/blob/v1-dev/README.md#configuring-electron-builder).
11+
5. You may remove `webpackConfig` and `webpackMainConfig` from vue-cli-plugin-electron-builder's plugin options. Webpack config for the renderer process is your normal webpack config, and you can use the `chainWebpackMainProcess` function ([guide](https://github.com/nklayman/vue-cli-plugin-electron-builder/blob/v1-dev/README.md#webpack-configuration)).
12+
6. You may remove `electron-webpack`, `electron-builder`, and, if used, `electron-webpack-ts` from your devDependencies. You may also remove `source-map-support` from your dependencies.
13+
14+
## What has changed:
15+
16+
- Electron-webpack is no longer used. Instead, your app is built as normal (but with some slight configuration changes).
17+
- This means there is no need to change your config to work with stylus, sass, or any other special files.
18+
- Typescript support is [automatic](https://github.com/nklayman/vue-cli-plugin-electron-builder/blob/v1-dev/README.md#adding-typescript-support) for both processes, just add the `@vue/typescript` plugin.
19+
- Your normal build will not be overwritten by `build:electron`.
20+
- The [folder structure](https://github.com/nklayman/vue-cli-plugin-electron-builder/blob/v1-dev/README.md#folder-structure) has changed dramatically.
21+
- Electron-builder's [config](https://github.com/nklayman/vue-cli-plugin-electron-builder/blob/v1-dev/README.md#configuring-electron-builder) is now taken from the `builderConfig` key in vue-cli-plugin-electron-builder's plugin options.
22+
- To learn more about the internals of this plugin, see [how it works](https://github.com/nklayman/vue-cli-plugin-electron-builder/blob/v1-dev/README.md#how-it-works).

0 commit comments

Comments
 (0)