Open v2018z opened 3 years ago
hi @v2018z ,I have configured the following according to your suggestion,but also can not see devtron panel.
require('update-electron-app')({
logger: require('electron-log')
})
const path = require('path')
const glob = require('glob')
const {app, BrowserWindow,session} = require('electron')
const debug = /--debug/.test(process.argv[2])
if (process.mas) app.setName('Electron APIs')
let mainWindow = null
function initialize () {
makeSingleInstance()
loadDemos()
function createWindow () {
const windowOptions = {
width: 1080,
minWidth: 680,
height: 840,
title: app.getName(),
webPreferences: {
nodeIntegration: true
}
}
if (process.platform === 'linux') {
windowOptions.icon = path.join(__dirname, '/assets/app-icon/png/512.png')
}
mainWindow = new BrowserWindow(windowOptions)
mainWindow.loadURL(path.join('file://', __dirname, '/index.html'))
// ไฝฟ็จ npm run dev
if (debug) {
mainWindow.webContents.openDevTools()
mainWindow.maximize()
require('devtron').install(session)
}
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.on('ready', () => {
createWindow()
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (mainWindow === null) {
createWindow()
}
})
}
initialize()
What is your system and Electron version?
Did you modify file devtron/manifest.json?
Hi! ๐
Firstly, thanks for your work on this project! ๐
I found that the higher version of electron could not be used because of some API changes and chrome security policy problems. My solutions are as follows:
Today I used patch-package to patch
devtron@1.4.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.