Yin Bin 4 months ago
parent
commit
807e75642f
3 changed files with 14 additions and 43 deletions
  1. 1 1
      .env
  2. 1 4
      src/views/bpm/model/index.vue
  3. 12 38
      vite.config.ts

+ 1 - 1
.env

@@ -20,6 +20,6 @@ VITE_APP_DOCALERT_ENABLE=true
 VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
 
 # 默认账户密码
-VITE_APP_DEFAULT_LOGIN_TENANT = 纽森源码
+VITE_APP_DEFAULT_LOGIN_TENANT = 纽森科技
 VITE_APP_DEFAULT_LOGIN_USERNAME = admin
 VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123

+ 1 - 4
src/views/bpm/model/index.vue

@@ -1,9 +1,6 @@
 <template>
   <!-- <doc-alert title="流程设计器(BPMN)" url="https://doc.iocoder.cn/bpm/model-designer-dingding/" /> -->
-  <doc-alert
-    title="流程设计器(钉钉、飞书)"
-    url="https://doc.iocoder.cn/bpm/model-designer-bpmn/"
-  />
+  <!-- <doc-alert title="流程设计器(钉钉、飞书)" url="https://doc.iocoder.cn/bpm/model-designer-bpmn/" /> -->
   <!-- <doc-alert title="选择审批人、发起人自选" url="https://doc.iocoder.cn/bpm/assignee/" /> -->
   <!-- <doc-alert title="会签、或签、依次审批" url="https://doc.iocoder.cn/bpm/multi-instance/" /> -->
 

+ 12 - 38
vite.config.ts

@@ -62,50 +62,24 @@ export default ({command, mode}: ConfigEnv): UserConfig => {
             ]
         },
         build: {
-            minify: 'esbuild', 
+            minify: 'terser',
             outDir: env.VITE_OUT_DIR || 'dist',
             sourcemap: env.VITE_SOURCEMAP === 'true' ? 'inline' : false,
-            chunkSizeWarningLimit: 2000, 
-            reportCompressedSize: false, 
-            cssCodeSplit: true,
-            emptyOutDir: true,
-            target: 'esnext',
-            assetsInlineLimit: 4096,
+            // brotliSize: false,
+            terserOptions: {
+                compress: {
+                    drop_debugger: env.VITE_DROP_DEBUGGER === 'true',
+                    drop_console: env.VITE_DROP_CONSOLE === 'true'
+                }
+            },
             rollupOptions: {
                 output: {
                     manualChunks: {
-                        'element-plus': ['element-plus'],
-                        'echarts': ['echarts'],
-                        'vue': ['vue', 'vue-router', 'pinia', '@vueuse/core'],
-                        'libs': ['axios', 'dayjs', '@wangeditor/editor'],
-                    },
-                    chunkFileNames: 'assets/js/[name]-[hash].js',
-                    entryFileNames: 'assets/js/[name]-[hash].js',
-                    assetFileNames: 'assets/[ext]/[name]-[hash].[ext]'
+                        echarts: ['echarts'] // 将 echarts 单独打包,参考 https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/IAB1SX 讨论
+                    }
                 },
-                maxParallelFileOps: 20,  
-            }
-        },
-        optimizeDeps: {
-            include,
-            exclude,
-            esbuildOptions: {
-                target: 'esnext',
-                minify: true,
-                minifyIdentifiers: true,
-                minifySyntax: true,
-                minifyWhitespace: true,
-                treeShaking: true,
-            }
+            },
         },
-        esbuild: {
-            pure: env.VITE_DROP_CONSOLE === 'true' ? ['console.log', 'debugger'] : [],
-            target: 'esnext',
-            treeShaking: true,
-            minifyIdentifiers: true,
-            minifySyntax: true,
-            minifyWhitespace: true,
-            legalComments: 'none'
-        }
+        optimizeDeps: {include, exclude}
     }
 }