mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-08-26 15:01:18 +08:00
feat: supported psar package
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* !!! ensure process.cwd() correct
|
||||
* for load-on preload.js
|
||||
*/
|
||||
process.chdir(__dirname.slice(0, __dirname.lastIndexOf('dist')))
|
||||
// process.chdir(__dirname.slice(0, __dirname.lastIndexOf('dist'))) 21-08-05 remove
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* electron 主文件
|
||||
*/
|
||||
import '@src/common/patch'
|
||||
import { join } from 'path'
|
||||
import { app, BrowserWindow } from 'electron'
|
||||
import dotenv from 'dotenv'
|
||||
@@ -18,7 +17,7 @@ function createWin() {
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
preload: join(__dirname, '../../src/preload/index.js'),
|
||||
preload: join(__dirname, '../preload/index.js'),
|
||||
},
|
||||
})
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import '@src/common/patch'
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import fs = require('fs')
|
||||
@@ -12,7 +11,8 @@ setTimeout(() => {
|
||||
// Configuration name causes hot updates to be slow | 传递 name 后会导致热更新很慢
|
||||
// console.log('electron-store', new Store({ name: 'electron-vue' }))
|
||||
// https://github.com/caoxiemeihao/electron-vue-vite/issues/10
|
||||
console.log('electron-store', new Store())
|
||||
|
||||
// console.log('electron-store', new Store()) 21-08-05 remove
|
||||
|
||||
// new Store 会阻塞线程,导致 preload 动画卡顿
|
||||
}, 2999)
|
||||
|
Reference in New Issue
Block a user