-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support advanced version of electron. #252
Comments
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? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
[email protected]
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: