12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- const { resolve } = require('path')
- const { name, version } = require('./package.json')
- console.log('安装包:', `${name}-v${version}-${process.platform}-${process.arch}-setup.exe`);
- module.exports = {
- publicPath: "/",
- outputDir: process.env.NODE_ENV === 'production' ? "dist" : process.env.NODE_ENV === 'test' ? "test" : "dist",
- assetsDir: "static",
- lintOnSave: false, // 关闭eslint
- runtimeCompiler: true,
- chainWebpack: config => {
- config.resolve.alias
- .set('@', resolve('src'))
- },
- pluginOptions: {
- 'style-resources-loader': {
- preProcessor: 'sass',
- patterns: [
- resolve(__dirname, './src/assets/styles/*.scss') //你的.scss文件所在目录
- ]
- },
- // 桌面应用打包配置
- electronBuilder: {
- builderOptions: {
- // build配置在此处
- // options placed here will be merged with default configuration and passed to electron-builder
- "appId": "XXX",
- "directories": {
- "output": process.env.NODE_ENV === 'production' ? "dist_electron" : "test_electron" // 输出文件夹
- },
- "publish": [
- {
- "provider": "generic",
- "url": "https://pc.liebaoai.cn/download/",//更新服务器地址,可为空
- }
- ],
- "mac": {
- "icon": "./static/image/desk-logo.ico",
- },
- "win": {
- "icon": "./static/image/desk-logo.ico",
- // "artifactName": `${name}-v${version}-${process.platform}-${process.arch}-setup.exe`,
- // "target": [{
- // "target": "nsis", "arch": ["x64","ia32"]
- // }]
- },
- "linux": {
- "icon": "./static/image/desk-logo.ico",
- // "artifactName": `${name}-v${version}-${process.platform}-${process.arch}-setup.exe`
- },
- // "asar": false,
- "nsis": {
- "oneClick": false,
- "guid": "猎豹AI聚合配送",
- "perMachine": true,
- "allowElevation": true,
- "allowToChangeInstallationDirectory": true,
- "installerIcon": "./static/image/desk-logo.ico",
- "uninstallerIcon": "./static/image/desk-logo.ico",
- "installerHeaderIcon": "./static/image/desk-logo.ico",
- "createDesktopShortcut": true,
- "createStartMenuShortcut": true,
- "shortcutName": process.env.NODE_ENV === 'production' ? "猎豹AI聚合配送" : "猎豹AI聚合配送测试版"
- }
- }
- }
- }
- }
|