PicList/vue.config.js

91 lines
2.0 KiB
JavaScript
Raw Normal View History

2019-12-19 06:17:21 -05:00
const path = require('path')
function resolve (dir) {
return path.join(__dirname, dir)
}
const config = {
configureWebpack: {
devtool: 'nosources-source-map'
},
2019-12-19 06:17:21 -05:00
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src/renderer'))
.set('~', resolve('src'))
.set('root', resolve('./'))
.set('#', resolve('src/universal'))
},
pluginOptions: {
electronBuilder: {
customFileProtocol: 'picgo://./',
externals: ['picgo'],
2019-12-19 06:17:21 -05:00
chainWebpackMainProcess: config => {
config.resolve.alias
.set('@', resolve('src/renderer'))
.set('~', resolve('src'))
.set('root', resolve('./'))
.set('#', resolve('src/universal'))
.set('apis', resolve('src/main/apis'))
.set('@core', resolve('src/main/apis/core'))
2019-12-19 06:17:21 -05:00
},
builderOptions: {
productName: 'PicGo',
appId: 'com.molunerfinn.picgo',
2020-01-01 05:18:51 -05:00
publish: [
{
provider: 'github',
owner: 'Molunerfinn',
repo: 'PicGo',
releaseType: 'draft'
}
],
2019-12-19 06:17:21 -05:00
dmg: {
contents: [
{
x: 410,
y: 150,
type: 'link',
path: '/Applications'
},
{
x: 130,
y: 150,
type: 'file'
}
]
},
mac: {
icon: 'build/icons/icon.icns',
extendInfo: {
LSUIElement: 1
}
},
win: {
icon: 'build/icons/icon.ico',
target: 'nsis'
},
nsis: {
shortcutName: 'PicGo',
oneClick: false,
allowToChangeInstallationDirectory: true
},
linux: {
icon: 'build/icons/'
2020-01-01 05:18:51 -05:00
},
snap: {
publish: ['github']
2019-12-19 06:17:21 -05:00
}
}
}
}
}
if (process.env.NODE_ENV === 'development') {
config.configureWebpack = {
devtool: 'eval-source-map'
}
}
module.exports = {
...config
}