From c7566bba45e6f90594d36ec4b80ac4ff89f577ee Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 08 十月 2026 14:19:36 +0800
Subject: [PATCH] 项目重构
---
vite.config.js | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/vite.config.js b/vite.config.js
index d3d9b6d..7c35347 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -2,12 +2,12 @@
import path from 'path'
import createVitePlugins from './vite/plugins'
-const baseUrl = 'http://localhost:8080' // 鍚庣鎺ュ彛
-
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
const env = loadEnv(mode, process.cwd())
const { VITE_APP_ENV } = env
+ // 鍚庣鎺ュ彛锛氶粯璁ゆ墦鍐呯綉鍏变韩鏈嶅姟锛屾湰鍦拌捣鍚庣鏃剁敤 VITE_APP_PROXY_TARGET 瑕嗙洊
+ const baseUrl = env.VITE_APP_PROXY_TARGET || 'http://192.168.0.24:9509/lims'
return {
// 閮ㄧ讲鐢熶骇鐜鍜屽紑鍙戠幆澧冧笅鐨刄RL銆�
// 榛樿鎯呭喌涓嬶紝vite 浼氬亣璁句綘鐨勫簲鐢ㄦ槸琚儴缃插湪涓�涓煙鍚嶇殑鏍硅矾寰勪笂
@@ -25,6 +25,23 @@
// https://cn.vitejs.dev/config/#resolve-extensions
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
+ // Web Worker 閰嶇疆锛歴rc/workers/*.worker.js 鍐呴儴 import 浜� big.js锛�
+ // 鎵撳寘鎴愰粯璁ょ殑 iife 鏍煎紡浼氬洜浠g爜鍒嗗壊鎶ラ敊锛屽繀椤荤敤 es 鏍煎紡
+ worker: {
+ format: 'es'
+ },
+ // 渚濊禆棰勬瀯寤哄叆鍙c��
+ // 榛樿绛栫暐浼氭妸 public/ 涓嬬殑 ie.html銆乴uckysheet 鐨� demo_index.html 褰撴垚鍏ュ彛锛�
+ // 杩欎簺鏂囦欢寮曠敤鐨勯兘鏄� UMD 鍏ㄥ眬鑴氭湰锛屾壂鎻忔鏃犳剰涔夈��
+ // 浣嗕笉鑳藉彧鐣� index.html锛氳矾鐢遍〉闈㈡槸鍔ㄦ�� import 鐨勶紝鍙壂 index.html 浼氳
+ // splitpanes / jspdf / @vue-office/* / echarts 杩欑被"棣栨杩涘叆鏌愪釜椤甸潰鎵嶅姞杞�"鐨勪緷璧�
+ // 鍦ㄨ繍琛屼腑琚彂鐜帮紝瑙﹀彂涓�娆″己鍒� reload銆傝�� reload 涓庨〉闈㈡覆鏌撶珵鎬佹椂锛�
+ // 浼氬嚭鐜版柊鏃т袱涓� hash 鐨� chunk 鍚屾椂瀛樺湪锛岃〃鐜颁负
+ // "renderSlot: Cannot read properties of null (reading 'ce')" 杩欑鍋囧穿婧冦��
+ // 鎵�浠ユ槑纭妸 src 绾冲叆鎵弿闈紝涓�娆℃�ф妸渚濊禆鎵鹃綈銆�
+ optimizeDeps: {
+ entries: ['index.html', 'src/**/*.{js,vue}']
+ },
// 鎵撳寘閰嶇疆
build: {
// https://vite.dev/config/build-options.html
--
Gitblit v1.9.3