| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import path from 'path';
- import { getBaseDir } from 'ee-core/ps';
- import type { Config } from 'ee-core';
- import { sharedWebPreferences } from './windowOptions';
- /**
- * 默认配置
- */
- export default (): Partial<Config> => {
- return {
- openDevTools: false,
- singleLock: true,
- windowsOption: {
- title: 'electron-egg',
- width: 1280,
- height: 860,
- minWidth: 1280,
- minHeight: 860,
- webPreferences: {
- //webSecurity: false,
- // 与智能工作台窗口共用同一份配置(见 windowOptions.ts),避免两窗口行为漂移
- ...sharedWebPreferences,
- //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: '/',
- }
- }
- }
|