You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dev-sidecar/packages/gui/vue.config.js

94 lines
2.7 KiB

const path = require('path')
const webpack = require('webpack')
const publishUrl = process.env.VUE_APP_PUBLISH_URL
3 years ago
const publishProvider = process.env.VUE_APP_PUBLISH_PROVIDER
3 years ago
console.log('publish url', publishUrl)
4 years ago
module.exports = {
pages: {
index: {
entry: 'src/main.js',
title: 'DevSidecar-给开发者的边车辅助工具'
}
},
3 years ago
configureWebpack: (config) => {
4 years ago
const configNew = {
plugins: [
new webpack.DefinePlugin({ 'global.GENTLY': true })
],
4 years ago
module: {
rules: [
{
test: /\.json5$/i,
loader: 'json5-loader',
options: {
esModule: false
},
type: 'javascript/auto'
}
]
}
}
return configNew
},
pluginOptions: {
electronBuilder: {
nodeIntegration: true,
// Provide an array of files that, when changed, will recompile the main process and restart Electron
// Your main process file will be added by default
mainProcessWatch: ['src/bridge', 'src/*.js', 'node_modules/dev-sidecar/src'],
builderOptions: {
afterPack: './pkg/after-pack.js',
afterAllArtifactBuild: './pkg/after-all-artifact-build.js',
3 years ago
// artifactBuildCompleted: './pkg/artifact-build-completed.js',
// builderOptions: {
// publish: ['github']// 此处写入github 就好,不用添加其他内容
// },
4 years ago
extraResources: [
{
from: 'extra',
to: 'extra'
4 years ago
}
],
appId: 'dev-sidecar',
3 years ago
productName: 'dev-sidecar',
// eslint-disable-next-line no-template-curly-in-string
artifactName: 'DevSidecar-${version}.${ext}',
copyright: 'Copyright © 2020-2021 Greper',
nsis: {
oneClick: false,
perMachine: true,
allowElevation: true,
allowToChangeInstallationDirectory: true,
include: './build/installer.nsh'
},
mac: {
3 years ago
icon: './build/mac/icon.icns',
target: {
arch: 'universal',
target: 'dmg'
}
4 years ago
},
win: {
icon: 'build/icons/'
// requestedExecutionLevel: 'highestAvailable' // 加了这个无法开机自启
},
linux: {
3 years ago
icon: 'build/mac/',
target: [
3 years ago
'deb',
3 years ago
'AppImage'
]
},
publish: {
3 years ago
provider: publishProvider,
url: publishUrl
4 years ago
// url: 'http://dev-sidecar.docmirror.cn/update/preview/'
}
},
chainWebpackMainProcess (config) {
config.entry('mitmproxy').add(path.join(__dirname, 'src/bridge/mitmproxy.js'))
4 years ago
}
}
}
}