You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/commonIssues.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,22 +6,20 @@ sidebarDepth: 2
6
6
7
7
## Blank screen on builds, but works fine on serve
8
8
9
-
This issue is likely caused when vue-router is operating in `history` mode. To fix this, add a `mounted` hook to the root Vue component:
10
-
11
-
```javascript
12
-
// src/main.js
13
-
14
-
newVue({
15
-
router,
16
-
render:h=>h(App),
17
-
mounted() {
18
-
// Prevent blank screen in Electron builds
19
-
this.$router.push('/')
20
-
}
21
-
}).$mount('#app')
9
+
This issue is likely caused when Vue Router is operating in `history` mode. In Electron, it only works in `hash` mode. To fix this, edit your `src/router.(js|ts)`:
0 commit comments