Skip to content

Commit

Permalink
修复dev模式运行问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Sep 20, 2023
1 parent 6d5cc38 commit 89255a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build-config/build-before-pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const replaceQrcDecodeLib = async(electronNodeAbi, platform, arch) => {

module.exports = async(context) => {
const { electronPlatformName, arch } = context
const electronNodeAbi = nodeAbi.getAbi(context.packager.info._framework.version, 'electron')
const electronVersion = context.packager?.info?._framework?.version ?? require('../package.json').devDependencies.electron.replace(/.*?(\d+)/, '$1')
const electronNodeAbi = nodeAbi.getAbi(electronVersion, 'electron')
await replaceQrcDecodeLib(electronNodeAbi, electronPlatformName, arch)
if (electronPlatformName !== 'linux' || process.env.FORCE) return
const bindingFilePath = path.join(__dirname, '../node_modules/better-sqlite3/binding.gyp')
Expand Down

0 comments on commit 89255a8

Please sign in to comment.