Skip to content

Commit 24375b4

Browse files
committed
[skip ci] docs(common issues): add silent async function errors
1 parent 3b4bf04 commit 24375b4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/guide/commonIssues.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,28 @@ if (isDevelopment && !process.env.IS_TEST) {
3636

3737
## Strict mime-type error when running a built app
3838

39+
```tip Notice
40+
As of v1.0.0-rc.5, this tag is no longer necessary. You can remove it if you wish.
41+
```
42+
3943
This is likely caused because you are missing code in your `public/index.html` file. To add it, simply run `vue invoke electron-builder`. This will re-invoke the generator of VCP Electron Builder. Any missing code will be detected and added automatically. If you would not like to re-invoke the generator, you can paste this code into the top of the `<head>` of your `public/index.html`:
4044

4145
```html
4246
<% if (BASE_URL === './') { %><base href="app://./" /><% } %>
4347
```
4448

49+
## Exceptions in `async` functions not getting logged to console
50+
51+
This bug can be fixed by adding the following code to the entrypoint of your Vue App `src/main.js`:
52+
53+
```javascript
54+
process.on('unhandledRejection', error => {
55+
console.error(error)
56+
})
57+
```
58+
59+
See [#118](https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/118) for more details. Thanks to [dspangenberg](https://github.com/dspangenberg) for the fix.
60+
4561
## Other issues
4662

4763
Many issues can be solved by re-invoking the generator of Vue CLI Plugin Electron Builder. This allows it to add newer code to your project files. You may need to do this after upgrading the plugin.

0 commit comments

Comments
 (0)