fix: 🔧 优化 isPackaged 判断条件解决某些情况下资源路径解析异常的问题

This commit is contained in:
viarotel 2023-10-17 18:46:13 +08:00
parent f6adfe06c0
commit fbd188511d

View File

@ -1,8 +1,7 @@
import { resolve } from 'node:path'
import { contextBridge } from 'electron'
export const isPackaged = !process.resourcesPath.includes('node_modules')
// export const isPackaged = !process.execPath.includes('node_modules')
export const isPackaged = !process.env.VITE_DEV_SERVER_URL
export const extraResolve = value =>
isPackaged