config.default.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import path from 'path';
  2. import { getBaseDir } from 'ee-core/ps';
  3. import type { Config } from 'ee-core';
  4. import { sharedWebPreferences } from './windowOptions';
  5. /**
  6. * 默认配置
  7. */
  8. export default (): Partial<Config> => {
  9. return {
  10. openDevTools: false,
  11. singleLock: true,
  12. windowsOption: {
  13. title: 'electron-egg',
  14. width: 1280,
  15. height: 860,
  16. minWidth: 1280,
  17. minHeight: 860,
  18. webPreferences: {
  19. //webSecurity: false,
  20. ...sharedWebPreferences,
  21. //preload: path.join(getElectronDir(), 'preload', 'bridge.js'),
  22. },
  23. frame: false,
  24. show: true,
  25. icon: path.join(getBaseDir(), 'public', 'images', 'logo-32.png'),
  26. },
  27. logger: {
  28. level: 'info', // 'fatal', 'error', 'warn', 'info', 'debug', 'trace' or 'silent'
  29. rotator: 'daily', // daily, hourly
  30. dateFormat: 'yyyy-MM-dd',
  31. maxSize: '100m',
  32. redact: [],
  33. redactCensor: '[Redacted]',
  34. timestamp: true,
  35. depthLimit: 5,
  36. timezone: 'Asia/Shanghai',
  37. name: 'ee',
  38. appLogName: 'ee.log',
  39. coreLogName: 'ee-core.log',
  40. errorLogName: 'ee-error.log'
  41. },
  42. mainServer: {
  43. protocol: 'file://',
  44. indexPath: '/public/dist/index.html',
  45. channelSeparator: '/',
  46. }
  47. }
  48. }