From 6a4a27022809f9647c781d8135ac8afc3fb7c393 Mon Sep 17 00:00:00 2001 From: he wei <858544502@qq.com> Date: 星期一, 23 十二月 2024 14:38:51 +0800 Subject: [PATCH] UA 添加 chr dcp 两种文件解析 --- vue.config.js | 52 +++++++++++++++++++++++++--------------------------- 1 files changed, 25 insertions(+), 27 deletions(-) diff --git a/vue.config.js b/vue.config.js index e05b4cc..1689ac3 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,48 +1,46 @@ -const path = require('path'); +const path = require("path"); +const json = require('./package.json'); +const { version } = json; function resolve(dir) { return path.join(__dirname, dir); } module.exports = { - publicPath: './', + publicPath: "./", devServer: { // can be overwritten by process.env.HOST - host: '0.0.0.0', - port: 8081 + host: "0.0.0.0", + port: 8081, }, - pluginOptions:{ - electronBuilder:{ - preload:'src/preload.js', + pluginOptions: { + electronBuilder: { + preload: "src/preload.js", builderOptions: { extraResources: [ { from: "./public/runtime", - to: "./runtime" + to: "./runtime", }, { from: "./public/app_x64.exe", - to: "./app_x64.exe" - } + to: "./app_x64.exe", + }, ], - files: [ - '**/*', - '!**/runtime', - '!**/app_x64.exe' - ], - } - } + files: ["**/*", "!**/runtime", "!**/app_x64.exe"], + }, + }, }, - chainWebpack: config => { + chainWebpack: (config) => { config.resolve.alias - .set('@', resolve('src')) - .set('src', resolve('src')) - .set('common', resolve('src/common')) - .set('components', resolve('src/components')); + .set("@", resolve("src")) + .set("src", resolve("src")) + .set("common", resolve("src/common")) + .set("components", resolve("src/components")); - config.plugin('html').tap((args) => { - args[0].title = 'fbx鏂囦欢瑙f瀽'; + config.plugin("html").tap((args) => { + args[0].title = `fbx鏂囦欢瑙f瀽 V${version}`; return args; - }) - } -}; \ No newline at end of file + }); + }, +}; -- Gitblit v1.9.1