Prechádzať zdrojové kódy

优化修改配置文件

haiyang 1 týždeň pred
rodič
commit
7102db6b31
5 zmenil súbory, kde vykonal 20 pridanie a 17 odobranie
  1. 1 2
      env/.env
  2. 1 1
      env/.env.development
  3. 3 3
      env/.env.production
  4. 14 10
      eslint.config.mjs
  5. 1 1
      manifest.config.ts

+ 1 - 2
env/.env

@@ -9,8 +9,7 @@ VITE_WX_APPID = 'wx23776edbfe90d642'
 # 比如你要部署到 https://unibest.tech/doc/ ,则配置为 /doc/
 VITE_APP_PUBLIC_BASE=/
 
-# 后台请求地址
-VITE_SERVER_BASEURL = 'https://life.baoxianzhanggui.com/locallive-pro-java'
+
 # 后台静态资源请求地址
 VITE_SERVER_RESOURCE_BASEURL ='/sys/common/static'
 # 备注:如果后台带统一前缀,则也要加到后面,eg: https://ukw0y1.laf.run/api

+ 1 - 1
env/.env.development

@@ -3,7 +3,7 @@ NODE_ENV = 'development'
 # 是否去除console 和 debugger
 VITE_DELETE_CONSOLE = false
 # 是否开启sourcemap
-VITE_SHOW_SOURCEMAP = false
+VITE_SHOW_SOURCEMAP = true
 # 是否开启懒加载
 VITE_LAZY_CODE_LOADING = false
 

+ 3 - 3
env/.env.production

@@ -3,12 +3,12 @@ NODE_ENV = 'production'
 # 是否去除console 和 debugger
 VITE_DELETE_CONSOLE = true
 # 是否开启sourcemap
-VITE_SHOW_SOURCEMAP = false
+VITE_SHOW_SOURCEMAP = true
 # 是否开启懒加载
-VITE_LAZY_CODE_LOADING = true
+VITE_LAZY_CODE_LOADING = 'requiredComponents'
 
 # 后台请求地址
-# VITE_SERVER_BASEURL = 'https://prod.xxx.com'
+VITE_SERVER_BASEURL = 'https://life.baoxianzhanggui.com/locallive-pro-java'
 
 # 后台静态资源请求地址
 #VITE_SERVER_RESOURCE_BASEURL ='/sys/common/static'

+ 14 - 10
eslint.config.mjs

@@ -5,7 +5,7 @@ export default uniHelper({
     vue: true,
     markdown: false,
     ignores: [
-    // 忽略uni_modules目录
+        // 忽略uni_modules目录
         '**/uni_modules/',
         // 忽略原生插件目录
         '**/nativeplugins/',
@@ -39,17 +39,21 @@ export default uniHelper({
         'vue/singleline-html-element-content-newline': ['error', { externalIgnores: ['text'] }],
         // vue SFC 调换顺序改这里
         'vue/block-order': ['error', { order: [['script', 'template'], 'style'] }],
-  },
+        'vue/first-attribute-linebreak': ['error', {
+            singleline: 'ignore', // 单行元素忽略此规则
+            multiline: 'always', // 多行元素强制在第一个属性前换行
+        }],
+    },
     formatters: {
-    /**
-     * Format CSS, LESS, SCSS files, also the `<style>` blocks in Vue
-     * By default uses Prettier
-     */
+        /**
+         * Format CSS, LESS, SCSS files, also the `<style>` blocks in Vue
+         * By default uses Prettier
+         */
         css: true,
         /**
-     * Format HTML files
-     * By default uses Prettier
-     */
+         * Format HTML files
+         * By default uses Prettier
+         */
         html: true,
-  }
+    }
 })

+ 1 - 1
manifest.config.ts

@@ -126,7 +126,7 @@ export default defineManifestConfig({
             es6: true,
             minified: true,
         },
-        lazyCodeLoading: 'requiredComponents',
+        lazyCodeLoading: VITE_LAZY_CODE_LOADING,
         optimization: {
             subPackages: true,
         },