From bc2306d1614899efdb188cd29cea3c853ef924ff Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期五, 15 十二月 2023 10:48:59 +0800
Subject: [PATCH] 功能修改

---
 vue.config.js |  124 ++++++++++++++++++++---------------------
 1 files changed, 61 insertions(+), 63 deletions(-)

diff --git a/vue.config.js b/vue.config.js
index 12527b1..031f18d 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,70 +1,68 @@
-const path = require('path')
-
-const resolve = dir => {
-  return path.join(__dirname, dir)
-}
-
-// 椤圭洰閮ㄧ讲鍩虹
-// 榛樿鎯呭喌涓嬶紝鎴戜滑鍋囪浣犵殑搴旂敤灏嗚閮ㄧ讲鍦ㄥ煙鐨勬牴鐩綍涓�,
-// 渚嬪锛歨ttps://www.my-app.com/
-// 榛樿锛�'/'
-// 濡傛灉鎮ㄧ殑搴旂敤绋嬪簭閮ㄧ讲鍦ㄥ瓙璺緞涓紝鍒欓渶瑕佸湪杩欐寚瀹氬瓙璺緞
-// 渚嬪锛歨ttps://www.foobar.com/my-app/
-// 闇�瑕佸皢瀹冩敼涓�'/my-app/'
-const BASE_URL = process.env.NODE_ENV === 'production'
-  ? './'
-  : './'
-
+/*
+ * @Author: 鐜嬫棴 1377869194@qq.com
+ * @Date: 2023-05-08 13:52:20
+ * @LastEditors: 鐜嬫棴 1377869194@qq.com
+ * @LastEditTime: 2023-05-08 14:17:30
+ * @FilePath: \LFWEB_NEW\vue.config.js
+ * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+const path = require("path")
+const resolve = dir => path.join(__dirname, dir)
 module.exports = {
-  // Project deployment base
-  // By default we assume your app will be deployed at the root of a domain,
-  // e.g. https://www.my-app.com/
-  // If your app is deployed at a sub-path, you will need to specify that
-  // sub-path here. For example, if your app is deployed at
-  // https://www.foobar.com/my-app/
-  // then change this to '/my-app/'
-  publicPath: BASE_URL,
-
-  // tweak internal webpack configuration.
-  // see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
-  chainWebpack: config => {
-    config.resolve.alias
-      .set('@', resolve('src'))
-      .set('@c', resolve('src/components'))
-      .set('@api', resolve('src/api'))
-      .set('@config', resolve('src/config'))
-      .set('@tools', resolve('src/components/tools'))
-      .set('@mixin', resolve('src/components/mixin'))
-      .set('@map', resolve('src/components/map'))
-      .set('@assets', resolve('src/assets'))
+  lintOnSave: false,
+  publicPath: "./",
+  devServer: {
+    host: "0.0.0.0", //鎸囧畾瑕佷娇鐢ㄧ殑 host
+    port: 12315, //鎸囧畾绔彛鍙蜂互渚﹀惉
+    hotOnly: false, //鍚敤鐑ā鍧楁浛鎹紝鑰屾棤闇�椤甸潰鍒锋柊浣滀负鏋勫缓澶辫触鏃剁殑鍥為��銆�
   },
 
+  configureWebpack: {
+    resolve: {
+      alias: {
+        "@": resolve("src"),
+      },
+    },
+  },
   css: {
     loaderOptions: {
-      less: {
-        javascriptEnabled: true
-      }
-    }
+      postcss: {
+        plugins: [
+          require("postcss-px-to-viewport")({
+            unitToConvert: "px", // 闇�瑕佽浆鎹㈢殑鍗曚綅
+            viewportWidth: 1920, // 瑙嗗彛瀹藉害锛岀瓑鍚屼簬璁捐绋垮搴�
+            unitPrecision: 5, // 绮剧‘鍒板皬鏁扮偣鍚庡嚑浣�
+            /**
+             * 灏嗕細琚浆鎹㈢殑css灞炴�у垪琛紝
+             * 璁剧疆涓� * 琛ㄧず鍏ㄩ儴锛屽锛歔'*']
+             * 鍦ㄥ睘鎬х殑鍓嶉潰鎴栧悗闈㈣缃�*锛屽锛歔'*position*']锛�*position* 琛ㄧず鎵�鏈夊寘鍚� position 鐨勫睘鎬э紝濡� background-position-y
+             * 璁剧疆涓� !xx 琛ㄧず涓嶅尮閰峹x鐨勯偅浜涘睘鎬э紝濡傦細['!letter-spacing'] 琛ㄧず闄や簡letter-spacing 灞炴�т箣澶栫殑鍏朵粬灞炴��
+             * 杩樺彲浠ュ悓鏃朵娇鐢� ! 鍜� * 锛屽['!font*'] 琛ㄧず闄や簡font-size銆� font-weight ...杩欎簺涔嬪灞炴�т箣澶栫殑鍏朵粬灞炴�у悕澶撮儴鏄�榝ont鈥欑殑灞炴��
+             * */
+            propList: ["*"],
+            viewportUnit: "vw", // 闇�瑕佽浆鎹㈡垚涓虹殑鍗曚綅
+            fontViewportUnit: "vw", // 闇�瑕佽浆鎹㈢О涓虹殑瀛椾綋鍗曚綅
+            /**
+             * 闇�瑕佸拷鐣ョ殑閫夋嫨鍣紝鍗宠繖浜涢�夋嫨鍣ㄥ搴旂殑灞炴�у�间笉鍋氬崟浣嶈浆鎹�
+             * 璁剧疆涓哄瓧绗︿覆锛岃浆鎹㈠櫒鍦ㄥ仛杞崲鏃朵細蹇界暐閭d簺閫夋嫨鍣ㄤ腑鍖呭惈璇ュ瓧绗︿覆鐨勯�夋嫨鍣紝濡傦細['body']浼氬尮閰嶅埌 .body-class锛屼篃灏辨剰鍛崇潃.body-class瀵瑰簲鐨勬牱寮忚缃笉浼氳杞崲
+             * 璁剧疆涓烘鍒欒〃杈惧紡锛屽湪鍋氳浆鎹㈠墠浼氬厛鏍¢獙閫夋嫨鍣ㄦ槸鍚﹀尮閰嶈姝e垯锛屽鏋滃尮閰嶏紝鍒欎笉杩涜杞崲锛屽[/^body$/]浼氬尮閰嶅埌 body 浣嗘槸涓嶄細鍖归厤鍒� .body
+             */
+            selectorBlackList: [],
+            minPixelValue: 1, // 鏈�灏忕殑鍍忕礌鍗曚綅鍊�
+            mediaQuery: false, // 鏄惁杞崲濯掍綋鏌ヨ涓缃殑灞炴�у��
+            replace: true, // 鏇挎崲鍖呭惈vw鐨勮鍒欙紝鑰屼笉鏄坊鍔犲洖閫�
+            /**
+             * 蹇界暐涓�浜涙枃浠讹紝濡�'node_modules'
+             * 璁剧疆涓烘鍒欒〃杈惧紡锛屽皢浼氬拷鐣ュ尮閰嶈姝e垯鐨勬墍鏈夋枃浠�
+             * 濡傛灉璁剧疆涓烘暟缁勶紝閭d箞璇ユ暟缁勫唴鐨勫厓绱犻兘蹇呴』鏄鍒欒〃杈惧紡
+             */
+            exclude: [],
+            landscape: false, // 鏄惁鑷姩鍔犲叆 @media (orientation: landscape)锛屽叾涓殑灞炴�у�兼槸閫氳繃妯睆瀹藉害鏉ヨ浆鎹㈢殑
+            landscapeUnit: "vw", // 妯睆鍗曚綅
+            landscapeWidth: 1334, // 妯睆瀹藉害
+          }),
+        ],
+      },
+    },
   },
-
-  // 鎵撳寘鏃朵笉鐢熸垚.map鏂囦欢
-  productionSourceMap: false,
-
-  devServer: {
-    open: true, // 鑷姩鎵撳紑娴忚鍣�
-    // 杩欓噷鍐欎綘璋冪敤鎺ュ彛鐨勫熀纭�璺緞锛屾潵瑙e喅璺ㄥ煙锛屽鏋滆缃簡浠g悊锛岄偅浣犳湰鍦板紑鍙戠幆澧冪殑axios鐨刡aseUrl瑕佸啓涓� '' 锛屽嵆绌哄瓧绗︿覆
-    proxy: 'http://www.example.com/api',
-    // Related: https://github.com/vuejs/vue-cli/issues/2051#issuecomment-449612956
-    disableHostCheck: true
-  },
-
-  pluginOptions: {
-    // 'style-resources-loader': {
-    //   preProcessor: 'less',
-    //   patterns: [
-    //     path.resolve(__dirname, 'src/style/custom.less') // global custom less file.
-    //   ]
-    // }
-  },
-  lintOnSave: false
 }

--
Gitblit v1.9.3