代码拉取完成,页面将自动刷新
同步操作将从 野火IM/vue-pc-chat 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// vue.config.js
const pkg = require('./package.json');
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",
resolve: {
mainFields: ['main', 'browser']
}
},
pluginOptions: {
chainWebpack: config => {
// config.module.rules.delete('eslint');
},
electronBuilder: {
preload: 'src/ui/workspace/bridgeClientImpl.js',
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)
config.module
.rule("vue")
.use("vue-loader")
.loader("vue-loader")
.tap(options => {
options.compilerOptions.directives = {
html(node, directiveMeta) {
(node.props || (node.props = [])).push({
name: "innerHTML",
value: `xss(_s(${directiveMeta.value}))`
});
}
};
return options;
});
},
// 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']
mainProcessArgs: ['--disable-background-timer-throttling', ''],
// outputDir: 'release',
builderOptions: {
// 产品名称
productName: pkg.name,
// 修改appId是,需要同时修改backgroud.js里面设置的appUserModelId,设置见:app.setAppUserModelId(xxx)
appId: pkg.appId,
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: pkg.name,
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: pkg.name,
}
}
}
},
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。