From da4257bc32483409af02a06dd342c6981ec786ec Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期一, 17 十一月 2025 17:14:14 +0800
Subject: [PATCH] 更新大屏幕页面和任务信息页面
---
项目代码/BigScreen/vue.config.js | 133 +++-----------------------------------------
1 files changed, 10 insertions(+), 123 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/vue.config.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/vue.config.js"
index c0d86e4..37154ff 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/vue.config.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/BigScreen/vue.config.js"
@@ -1,129 +1,16 @@
-/*
- * @Author: daidai
- * @Date: 2021-11-22 14:57:15
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-04-29 15:12:50
- */
-const path = require("path");
-function resolve(dir) {
- return path.join(__dirname, dir);
+const path = require('path')
+const resolve = dir => {
+ return path.join(__dirname, dir)
}
-
module.exports = {
publicPath: './',
- outputDir: process.env.VUE_APP_outputDir || 'dist',
- assetsDir: 'static',
- filenameHashing: true,
- lintOnSave: false,
- runtimeCompiler: false,
- transpileDependencies: [],
- productionSourceMap: false,
- css: {
- // 鏄惁浣跨敤css鍒嗙鎻掍欢 ExtractTextPlugin
- extract: process.env.NODE_ENV === "production" ? true : false,//鏄惁灏嗙粍浠朵腑鐨� CSS 鎻愬彇鑷充竴涓嫭绔嬬殑 CSS 鏂囦欢涓� (鑰屼笉鏄姩鎬佹敞鍏ュ埌 JavaScript 涓殑 inline 浠g爜)銆�
- sourceMap: false,//鏄惁涓� CSS 寮�鍚� source map銆傝缃负 true 涔嬪悗鍙兘浼氬奖鍝嶆瀯寤虹殑鎬ц兘銆�
- loaderOptions: {
- sass: {
- prependData: `@import "@/assets/css/variable.scss";`
- }
- },
- requireModuleExtension: true,
+ devServer:{
+ host:'0.0.0.0',
+ port:8090
},
-
- chainWebpack: (config) => {
- // 閰嶇疆鍒悕
+ chainWebpack: config => {
config.resolve.alias
- .set('@', resolve('src'))
- .set('assets', resolve('src/assets'))
- .set('assetsBig', resolve('src/pages/big-screen/assets'))
- .set('components', resolve('src/components'))
- .set('views', resolve('src/views'))
- .set('api', resolve('src/api'))
- .set('lib', resolve('src/lib'))
-
- if (process.env.NODE_ENV === "production") {
- // 鍒犻櫎绯荤粺榛樿鐨剆plitChunk
- config.optimization.delete("splitChunks");
- }
- // 鍒犻櫎棰勫姞杞�
- // // 绉婚櫎 prefetch 鎻掍欢
- // config.plugins.delete('prefetch-index')
- // // 绉婚櫎 preload 鎻掍欢
- // config.plugins.delete('preload-index');
- // config.optimization.minimizer('terser').tap((args) => {
- // // 鍘婚櫎鐢熶骇鐜console
- // args[0].terserOptions.compress.drop_console = true
- // return args
- // })
+ .set('_c', resolve('src/components')) // key,value鑷瀹氫箟锛屾瘮濡�.set('@@', resolve('src/components'))
},
- configureWebpack: config => {
- // 缁欒緭鍑虹殑js鍚嶇О娣诲姞hash
- config.output.filename = "static/js/[name].[hash].js";
- config.output.chunkFilename = "static/js/[name].[hash].js";
- config.optimization = {
- splitChunks: {
- cacheGroups: {
- // 鎶界鎵�鏈夊叆鍙g殑鍏敤璧勬簮涓轰竴涓猚hunk
- common: {
- name: "chunk-common",
- chunks: "initial",
- minChunks: 2,
- maxInitialRequests: 5,
- minSize: 0,
- priority: 1,
- reuseExistingChunk: true,
- enforce: true
- },
- // 鎶界node_modules涓嬬殑搴撲负涓�涓猚hunk
- // vendors: {
- // name: "chunk-vendors",
- // test: /[\\/]node_modules[\\/]/,
- // chunks: "initial",
- // priority: 2,
- // reuseExistingChunk: true,
- // enforce: true
- // },
- element: {
- name: "chunk-element-ui",
- test: /[\\/]node_modules[\\/]element-ui[\\/]/,
- chunks: "all",
- priority: 3,
- reuseExistingChunk: true,
- enforce: true
- },
- yhhtUi: {
- name: "chunk-yhht-ui",
- test: /[\\/]node_modules[\\/]yhht-ui[\\/]/,
- chunks: "all",
- priority: 4,
- reuseExistingChunk: true,
- enforce: true
- },
- datav: {
- name: "chunk-datav",
- test: /[\\/]node_modules[\\/]@jiaminghi[\\/]data-view[\\/]/,
- chunks: "all",
- priority: 4,
- reuseExistingChunk: true,
- enforce: true
- },
- }
- }
- };
- },
- // 鏄惁涓� Babel 鎴� TypeScript 浣跨敤 thread-loader銆傝閫夐」鍦ㄧ郴缁熺殑 CPU 鏈夊浜庝竴涓唴鏍告椂鑷姩鍚敤锛屼粎浣滅敤浜庣敓浜ф瀯寤恒��
- parallel: require('os').cpus().length > 1,
- devServer: {
- // '/api':{
- // target: 'http://192.168.8.211:8098/',
- // // 璺ㄥ煙閰嶇疆
- // changeOrigin: true,
- // // 璺緞閲嶅啓
- // pathRewrite:{
- // '^/api': '/'
- // }
- // }
- },
- pluginOptions: {
- }
-}
+ lintOnSave: false
+}
\ No newline at end of file
--
Gitblit v1.9.3