vue-cli-plugin-electron-haunv 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  const { app, BrowserWindow } = require("electron")
2
2
  const path = require("path")
3
- const { installExtension, VUEJS_DEVTOOLS } = require('@tomjs/electron-devtools-installer');
4
3
 
5
4
  const isDevelopment = process.env.NODE_ENV !== 'production'
6
5
  function createWindow() {
@@ -29,9 +28,14 @@ function createWindow() {
29
28
  app.whenReady().then(async () => {
30
29
 
31
30
  if (isDevelopment && !process.env.IS_TEST) {
32
- installExtension(VUEJS_DEVTOOLS)
33
- .then(ext => console.log(`Added Extension: ${ext.name}`))
34
- .catch(err => console.log('An error occurred: ', err));
31
+ try {
32
+ const { installExtension, VUEJS_DEVTOOLS } = require('@tomjs/electron-devtools-installer')
33
+ installExtension(VUEJS_DEVTOOLS)
34
+ .then(ext => console.log(`Added Extension: ${ext.name}`))
35
+ .catch(err => console.log('An error occurred: ', err))
36
+ } catch (e) {
37
+ console.log('DevTools installer not available:', e.message)
38
+ }
35
39
  }
36
40
 
37
41
  createWindow()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-cli-plugin-electron-haunv",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "keywords": [