1 Star 0 Fork 16

sundrip/Bittly

forked from Gitee 极速下载/Bittly 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 4.31 KB
一键复制 编辑 原始数据 按行查看 历史
/**
* set configuration variables
*/
console.log(`NODE_ENV : ${process.env.NODE_ENV}`);
console.log(`BITTLY_HOST_TYPE : ${process.env.BITTLY_HOST_TYPE}`);
console.log(`BITTLY_WEBAPP_ASSETS_PATH : ${process.env.BITTLY_WEBAPP_ASSETS_PATH}`);
let productionSourceMap = false;
let publicPath = '/';
let pageTemplate = 'public/index.html';
if ( 'development' === process.env.NODE_ENV ) {
productionSourceMap = true;
} else if ( 'production' === process.env.NODE_ENV && 'browser' === process.env.BITTLY_HOST_TYPE ) {
publicPath = process.env.BITTLY_WEBAPP_ASSETS_PATH;
pageTemplate = 'public/index-webapp.html';
productionSourceMap = true;
}
/**
* configurations for vue cli
* @link https://cli.vuejs.org/config/
*/
module.exports = {
/**
* The base URL your application bundle will be deployed at.
* @property {String}
* @link https://cli.vuejs.org/config/#publicpath
*/
publicPath : publicPath,
/**
* Setting this to false can speed up production builds if you don't need source maps for production.
* @property {String}
* @link https://cli.vuejs.org/config/#productionsourcemap
*/
// productionSourceMap : productionSourceMap,
/**
* webpack configurations
* @property {Object}
* @see {webpack.config.js}
* @link https://cli.vuejs.org/config/#configurewebpack
*/
configureWebpack: require('./webpack.config.js'),
/**
* css options
*/
css: {
extract : 'development' === process.env.NODE_ENV ? false : {
ignoreOrder: true
}
},
/**
* build the app in multi-page mode
* @property {Object}
* @link https://cli.vuejs.org/config/#pages
*/
pages: {
index: {
entry: 'src/main.js',
template: pageTemplate,
filename: 'index.html',
title: 'Bittly',
chunks: ['chunk-vendors', 'chunk-common', 'index']
},
toolTerminal : {
entry: 'src/tools/terminal/index.js',
template: pageTemplate,
filename: 'tool-terminal.html',
title: 'Terminal',
chunks: ['chunk-vendors', 'chunk-common', 'toolTerminal']
},
toolCalculator : {
entry: 'src/tools/calculator/index.js',
template: pageTemplate,
filename: 'tool-calculator.html',
title: 'Calculator',
chunks: ['chunk-vendors', 'chunk-common', 'toolCalculator']
},
},
pluginOptions: {
/**
* configurations for electron builder plugin
* @link https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/configuration.html
*/
electronBuilder: {
externals: ['serialport','bluetooth-serial-port'],
preload: 'src/preload.js',
/**
* electron-builder options
* @link https://www.electron.build/configuration/configuration
*/
builderOptions : {
npmRebuild : false,
win : {
target : ['nsis','zip'],
icon : "build/icon.ico",
},
linux : {
target : ['AppImage'],
icon: "build/icon/",
category : "Development",
},
nsis: {
allowToChangeInstallationDirectory: true,
oneClick: false,
installerIcon : 'build/installer-icon.ico',
uninstallerIcon : 'build/uninstall-icon.ico',
createDesktopShortcut : true,
createStartMenuShortcut : true,
artifactName : "bittly-${version}-win-${arch}.exe",
menuCategory : 'Bittly',
},
appImage : {
artifactName : "bittly-${version}-${arch}.AppImage",
},
dmg: {
// artifactName : "bittly-${version}-${arch}.AppImage",
icon : "build/icon/Icon-512x512.png",
},
extraFiles : [
],
publish : [{
provider : "generic",
url : "http://127.0.0.1/update/",
}],
},
},
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/sundrip/Bittly.git
git@gitee.com:sundrip/Bittly.git
sundrip
Bittly
Bittly
main

搜索帮助