File tree 7 files changed +27
-10
lines changed
7 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Often this issue is caused when Vue Devtools fails to install. This may happen i
28
28
``` javascript
29
29
if (isDevelopment && ! process .env .IS_TEST ) {
30
30
// Install Vue Devtools
31
- await installVueDevtools ( )
31
+ await installExtension ( VUEJS_DEVTOOLS )
32
32
}
33
33
```
34
34
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ app.on('ready', async () => {
237
237
if (isDevelopment && ! process .env .IS_TEST ) {
238
238
// Install Vue Devtools
239
239
try {
240
- await installVueDevtools ( )
240
+ await installExtensions ( VUEJS_DEVTOOLS )
241
241
} catch (e) {
242
242
console .error (' Vue Devtools failed to install:' , e .toString ())
243
243
}
Original file line number Diff line number Diff line change @@ -105,7 +105,9 @@ module.exports = (api, options = {}) => {
105
105
}
106
106
addScript ( 'postinstall' , 'electron-builder install-app-deps' )
107
107
addScript ( 'postuninstall' , 'electron-builder install-app-deps' )
108
- const devDependencies = { }
108
+ const devDependencies = {
109
+ 'electron-devtools-installer' : '^3.1.0'
110
+ }
109
111
if ( electronVersion ) {
110
112
// Use provided electron version
111
113
devDependencies . electron = electronVersion
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
3
import { app , protocol , BrowserWindow } from 'electron'
4
- import {
5
- createProtocol ,
6
- < % if ( devtoolsExtensionsBroken ) { % > / * installVueDevtools * / < % } else { % > installVueDevtools < % } % >
7
- } from 'vue-cli-plugin-electron-builder/lib'
4
+ import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
5
+ < % if ( devtoolsExtensionsBroken ) { % > / / < % } % > import installExtension , { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
8
6
const isDevelopment = process . env . NODE_ENV !== 'production'
9
7
10
8
// Keep a global reference of the window object, if you don't, the window will
@@ -73,12 +71,12 @@ app.on('ready', async () => {
73
71
// In addition, if you upgrade to Electron ^8.2.5 or ^9.0.0 then devtools should work fine
74
72
75
73
// try {
76
- // await installVueDevtools( )
74
+ // await installExtension(VUEJS_DEVTOOLS )
77
75
// } catch (e) {
78
76
// console.error('Vue Devtools failed to install:', e.toString())
79
77
// }
80
78
< % } else { % > try {
81
- await installVueDevtools ( )
79
+ await installExtension ( VUEJS_DEVTOOLS )
82
80
} catch ( e ) {
83
81
console . error ( 'Vue Devtools failed to install:' , e . toString ( ) )
84
82
} < % } % >
Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ if (fs.existsSync(getIDMapPath())) {
20
20
}
21
21
22
22
const install = ( forceDownload = false ) => {
23
+ console . log (
24
+ 'installVueDevtools() is deprecated, and will be removed in a future release.'
25
+ )
26
+ console . log ( 'Please use electron-devtools-installer instead.' )
27
+ console . log (
28
+ 'See https://github.com/nklayman/vue-cli-plugin-electron-builder/releases/tag/v2.0.0-rc.4 for details.'
29
+ )
23
30
// return new Promise(resolve => {
24
31
const chromeStoreID = 'nhdogjmejiglipccpnnnanhbledajbpd'
25
32
const extensionName = IDMap [ chromeStoreID ]
@@ -31,7 +38,7 @@ const install = (forceDownload = false) => {
31
38
return Promise . resolve ( IDMap [ chromeStoreID ] )
32
39
}
33
40
return downloadChromeExtension ( chromeStoreID , forceDownload ) . then (
34
- extensionFolder => {
41
+ ( extensionFolder ) => {
35
42
// Use forceDownload, but already installed
36
43
if ( extensionInstalled ) {
37
44
BrowserWindow . removeDevToolsExtension ( extensionName )
Original file line number Diff line number Diff line change 61
61
"chai" : " ^4.2.0" ,
62
62
"chai-as-promised" : " ^7.1.1" ,
63
63
"electron" : " ^9.0.3" ,
64
+ "electron-devtools-installer" : " ^3.1.0" ,
64
65
"eslint" : " ^7.2.0" ,
65
66
"eslint-config-standard" : " ^14.0.0" ,
66
67
"eslint-plugin-import" : " ^2.21.2" ,
Original file line number Diff line number Diff line change @@ -6521,6 +6521,15 @@ electron-chromedriver@^9.0.0:
6521
6521
"@electron/get" "^1.12.2"
6522
6522
extract-zip "^2.0.0"
6523
6523
6524
+ electron-devtools-installer@^3.1.0:
6525
+ version "3.1.0"
6526
+ resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-3.1.0.tgz#c7800d36ab8438b51d2e03345860f817ecb5797f"
6527
+ integrity sha512-qZd1Aoya8YOK6QauNX92V5qyKGtb4lbs238bP+qtMBkXts24xJ/1PtOVBPvdg5w3Ts9L5o6I9sDErKuzHeJFDA==
6528
+ dependencies:
6529
+ rimraf "^3.0.2"
6530
+ semver "^7.2.1"
6531
+ unzip-crx "^0.2.0"
6532
+
6524
6533
6525
6534
version "22.7.0"
6526
6535
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-22.7.0.tgz#d92ba7c4007c9ac1dd070593e48028184fb2dc19"
You can’t perform that action at this time.
0 commit comments