从webpack迁移到vite

This commit is contained in:
lyswhut
2023-08-07 18:49:14 +08:00
parent 31e16a7ed7
commit 028bf5919d
166 changed files with 3071 additions and 11869 deletions
+4
View File
@@ -0,0 +1,4 @@
import log from 'electron-log'
log.transports.file.level = 'info'
log.initialize()
+5 -5
View File
@@ -1,8 +1,8 @@
import Store from 'electron-store'
import { dialog, shell } from 'electron'
import { join } from 'path'
import fs from 'fs'
import log from 'electron-log'
import path from 'node:path'
import fs from 'node:fs'
import { log } from '@common/utils'
type Stores = Record<string, Store>
@@ -27,8 +27,8 @@ export default (name: string, isIgnoredError = true, isShowErrorAlert = true): S
if (!isIgnoredError) throw error
const backPath = join(global.lxDataPath, name + '.json.bak')
fs.renameSync(join(global.lxDataPath, name + '.json'), backPath)
const backPath = path.join(global.lxDataPath, name + '.json.bak')
fs.renameSync(path.join(global.lxDataPath, name + '.json'), backPath)
if (isShowErrorAlert) {
dialog.showMessageBoxSync({
type: 'error',