File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,14 @@ module.exports = (api, options = {}) => {
12
12
fs . existsSync ( api . resolve ( './src/background.ts' ) ) ||
13
13
fs . existsSync ( api . resolve ( './src/background.js' ) )
14
14
15
- const devtoolsExtensionsBroken = semver . gte (
15
+ const devtoolsExtensionsBroken = semver . satisfies (
16
16
( electronVersion || pkg . devDependencies . electron ) . replace ( '^' , '' ) ,
17
- '6 .0.0'
17
+ '^6.0.0||^7 .0.0'
18
18
)
19
19
if ( devtoolsExtensionsBroken ) {
20
- warn ( 'Devtools extensions are broken in Electron 6.0.0 and greater' )
20
+ warn (
21
+ 'Devtools extensions are broken in Electron versions 6/7/<8.2.5 on Windows'
22
+ )
21
23
warn (
22
24
'Vue Devtools have been disabled, see the comments in your background file for more info'
23
25
)
Original file line number Diff line number Diff line change @@ -61,22 +61,22 @@ app.on('activate', () => {
61
61
app . on ( 'ready' , async ( ) => {
62
62
if ( isDevelopment && ! process . env . IS_TEST ) {
63
63
// Install Vue Devtools
64
- < % if ( devtoolsExtensionsBroken ) { % > // Devtools extensions are broken in Electron 6.0.0 and greater
64
+ < % if ( devtoolsExtensionsBroken ) { % > // Devtools extensions are broken in Electron 6/7/<8.25 on Windows
65
65
// See https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/378 for more info
66
66
// Electron will not launch with Devtools extensions installed on Windows 10 with dark mode
67
- // If you are not using Windows 10 dark mode, you may uncomment these lines
68
- // In addition, if the linked issue is closed, you can upgrade electron and uncomment these lines
67
+ // If you are not using Windows 10 dark mode, you may uncomment the following lines (and the import at the top of the file)
68
+ // In addition, if you upgrade to Electron ^8.2.5 or ^9.0.0 then devtools should work fine
69
+
69
70
// try {
70
71
// await installVueDevtools()
71
72
// } catch (e) {
72
73
// console.error('Vue Devtools failed to install:', e.toString())
73
74
// }
74
75
< % } else { % > try {
75
- await installVueDevtools ( )
76
- } catch ( e ) {
77
- console . error ( 'Vue Devtools failed to install:' , e . toString ( ) )
78
- }
79
- < % } % >
76
+ await installVueDevtools ( )
77
+ } catch ( e ) {
78
+ console . error ( 'Vue Devtools failed to install:' , e . toString ( ) )
79
+ } < % } % >
80
80
}
81
81
createWindow ( )
82
82
} )
You can’t perform that action at this time.
0 commit comments