1 Star 0 Fork 0

redsky1989 / vue-pc-chat001

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 4.62 KB
一键复制 编辑 原始数据 按行查看 历史
heavyrian2012 提交于 2021-12-29 14:29 . mac universal
// vue.config.js
const CopywebpackPlugin = require('copy-webpack-plugin')
module.exports = {
publicPath: '.',
chainWebpack: config => {
config.module.rules.delete('eslint');
},
configureWebpack: {
// Webpack configuration applied to web builds and the electron renderer process
target: "electron-renderer"
},
pluginOptions: {
chainWebpack: config => {
// config.module.rules.delete('eslint');
},
electronBuilder: {
externals: ['electron-screenshots'],
chainWebpackMainProcess: (config) => {
// Chain webpack config for electron main process only
config.module
.rule('native')
.test(/\.node$/)
.use('native-ext-loader')
.loader('native-ext-loader')
.end();
// config.externals({
// 'electron-screenshots': 'require("electron-screenshots")'
// });
config.plugin('copy').use(CopywebpackPlugin, [
[
{
from: `${__dirname}/public/**/*`,
to: `${__dirname}/dist_electron`,
},
]
]);
},
chainWebpackRendererProcess: (config) => {
// Chain webpack config for electron renderer process only (won't be applied to web builds)
},
// nodeIntegration: true,
contextIsolation: false,
webSecurity: false,
// Use this to change the entrypoint of your app's main process
// mainProcessFile: 'src/myBackgroundFile.js',
// Use this to change the entry point of your app's render process. default src/[main|index].[js|ts]
// rendererProcessFile: 'src/myMainRenderFile.js',
// 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/myFile1', 'src/myFile2'],
// Provide a list of arguments that Electron will be launched with during "electron:serve",
// which can be accessed from the main process (src/background.js).
// Note that it is ignored when --debug flag is used with "electron:serve", as you must launch Electron yourself
// Command line args (excluding --debug, --dashboard, and --headless) are passed to Electron as well
// mainProcessArgs: ['--arg-name', 'arg-value']
// outputDir: 'release',
builderOptions: {
// 产品名称
productName: 'wildfirechat',
// 修改appId是,需要同时修改backgroud.js里面设置的appUserModelId,设置见:app.setAppUserModelId(xxx)
appId: 'cn.wildfire.chat',
compression: 'normal',
artifactName: '${productName}-${version}-${os}-${arch}.${ext}',
protocols: {
name: "wf-deep-linking",
schemes: ["wfc"]
},
mac: {
extendInfo: {
NSCameraUsageDescription: "This app requires camera access to record video.",
NSMicrophoneUsageDescription: "This app requires microphone access to record audio."
},
hardenedRuntime: true,
gatekeeperAssess: false,
entitlements: "build/mac/entitlements.mac.plist",
entitlementsInherit: "build/mac/entitlements.mac.plist",
target: [
{
target:'default',
arch:[
'universal'
]
}
]
},
linux: {
category: "Chat",
executableName: "wildfireChat",
target: [
'deb',
'AppImage'
]
},
win: {
target: "nsis",
requestedExecutionLevel: "asInvoker"
},
nsis: {
oneClick: false,
allowToChangeInstallationDirectory: true,
artifactName: '${productName}-${version}-${os}-${arch}-setup.${ext}',
deleteAppDataOnUninstall: true,
perMachine: false,
createDesktopShortcut: true,
shortcutName: "wildfireChat"
}
}
}
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/redsky1989/vue-pc-chat001.git
git@gitee.com:redsky1989/vue-pc-chat001.git
redsky1989
vue-pc-chat001
vue-pc-chat001
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891