Skip to content

Commit

Permalink
fix: 🔧 优化 isPackaged 判断条件解决某些情况下资源路径解析异常的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Oct 17, 2023
1 parent f6adfe0 commit fbd1885
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions electron/helpers/index.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit fbd1885

Please sign in to comment.