import path from 'path'; import { getBaseDir } from 'ee-core/ps'; import type { Config } from 'ee-core'; /** * 默认配置 */ export default (): Partial => { return { openDevTools: false, singleLock: true, windowsOption: { title: 'electron-egg', width: 1080, height: 780, minWidth: 1080, minHeight: 780, webPreferences: { //webSecurity: false, contextIsolation: false, // false -> 可在渲染进程中使用electron的api,true->需要bridge.js(contextBridge) nodeIntegration: true, //preload: path.join(getElectronDir(), 'preload', 'bridge.js'), }, frame: false, show: true, icon: path.join(getBaseDir(), 'public', 'images', 'logo-32.png'), }, logger: { level: 'info', // 'fatal', 'error', 'warn', 'info', 'debug', 'trace' or 'silent' rotator: 'daily', // daily, hourly dateFormat: 'yyyy-MM-dd', maxSize: '100m', redact: [], redactCensor: '[Redacted]', timestamp: true, depthLimit: 5, timezone: 'Asia/Shanghai', name: 'ee', appLogName: 'ee.log', coreLogName: 'ee-core.log', errorLogName: 'ee-error.log' }, mainServer: { protocol: 'file://', indexPath: '/public/dist/index.html', channelSeparator: '/', } } }