Skip to content

Commit

Permalink
chore: 清理冗余代码
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiuChen committed Apr 22, 2023
1 parent f156e5b commit 4776db7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ import router from './router'
import { createPinia } from 'pinia'
import { registerIcon } from '@/common/registerIcon'
import { registerCallback } from '@/common/registerCallback'
import { isElectron, SERVER_DEV } from './utils'
import { isElectron } from './utils'

try {
// if (!SERVER_DEV && !isElectron) throw new Error('unsupported platform') // 禁用非 electron 环境的运行
// if (!SERVER_DEV && utools.isDev()) throw Error('unsupported enviroment') // 禁用非热更新服务器的开发模式的运行 防止逆向

const pinia = createPinia()
createApp(App).use(router).use(pinia).use(registerIcon).mount('#app')

createApp(App).use(router).use(createPinia()).use(registerIcon).mount('#app')
registerCallback()
} catch (error) {
if (isElectron) utools.showNotification('初始化失败: ' + error)
Expand Down

0 comments on commit 4776db7

Please sign in to comment.