Compare commits

...

2 Commits

Author SHA1 Message Date
Luke Hagar
52fce25787
perf: allow integrating more complex render solutions (#412) 2024-02-24 01:01:26 +08:00
alex8088
19489a28c8 perf: build compatilibity target for Electron 29 2024-02-24 00:31:41 +08:00
2 changed files with 3 additions and 1 deletions

View File

@ -64,6 +64,7 @@ export function getElectronNodeTarget(): string {
const electronVer = getElectronMajorVer()
const nodeVer = {
'29': '20.9',
'28': '18.18',
'27': '18.17',
'26': '18.16',
@ -93,6 +94,7 @@ export function getElectronChromeTarget(): string {
const electronVer = getElectronMajorVer()
const chromeVer = {
'29': '122',
'28': '120',
'27': '118',
'26': '116',

View File

@ -393,7 +393,7 @@ export function electronRendererVitePlugin(options?: ElectronPluginOptions): Plu
} else {
const targets = Array.isArray(build.target) ? build.target : [build.target]
if (targets.some(t => !t.startsWith('chrome') && !/^es((202\d{1})|next)$/.test(t))) {
throw new Error('The electron vite renderer config build.target must be "chrome?" or "es?".')
config.logger.warn('The electron vite renderer config build.target is not "chrome?" or "es?". This could be a mistake.')
}
}