chore: 用esbuild代替vite来打包main

This commit is contained in:
qier222 2022-03-29 16:52:53 +08:00
parent b4590c3c34
commit c4219afd3d
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
152 changed files with 669 additions and 747 deletions

View file

@ -1,29 +0,0 @@
import styles from 'ansi-styles'
import { app } from 'electron'
import logger from 'electron-log'
const color = (hex: string, text: string) => {
return `${styles.color.ansi(styles.hexToAnsi(hex))}${text}${
styles.color.close
}`
}
logger.transports.console.format = `${color(
'38bdf8',
'[main]'
)} {h}:{i}:{s}.{ms}{scope} {text}`
logger.transports.file.level = app.isPackaged ? 'info' : 'debug'
logger.info(
color(
'335eea',
`\n\n██╗ ██╗███████╗███████╗██████╗ ██╗ █████╗ ██╗ ██╗███╗ ███╗██╗ ██╗███████╗██╗ ██████╗
\n`
)
)
export default logger