-
Notifications
You must be signed in to change notification settings - Fork 3
/
vue.config.js
31 lines (29 loc) · 1003 Bytes
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const { execSync } = require('child_process')
const appName = process.env.APP_NAME || 'D3Ledger'
module.exports = {
pluginOptions: {
electronBuilder: {
chainWebpackMainProcess: config => {
config.plugin('define').tap(args => {
args[0]['process.env.APP_NAME'] = JSON.stringify(appName)
args[0]['process.env.COMMIT_HASH'] = JSON.stringify(execSync('git rev-parse HEAD').toString().trim())
args[0]['process.env.COMMIT_HASH_SHORT'] = JSON.stringify(execSync('git rev-parse --short HEAD').toString().trim())
return args
})
return config
},
builderOptions: {
productName: `${appName} OTS`,
mac: {
icon: appName === 'D3Ledger' ? 'build/logo' : 'build/logo-sora'
},
win: {
icon: appName === 'D3Ledger' ? 'build/logo' : 'build/logo-sora'
},
linux: {
icon: appName === 'D3Ledger' ? 'build/logo' : 'build/logo-sora'
}
}
}
}
}