From 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 01 Sep 2025 11:20:24 +0800
Subject: [PATCH] Merge branch 'refs/heads/feature/v5.0/5.0.5' into patch_management

---
 vite.config.mjs |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/vite.config.mjs b/vite.config.mjs
index 0b8ec4a..7c1f6b1 100644
--- a/vite.config.mjs
+++ b/vite.config.mjs
@@ -9,15 +9,6 @@
   // 判断是打生产环境包
   const isProd = VITE_APP_ENV === 'production'
 
-  const mapApi = VITE_APP_ENV === 'development' ? {
-    target: VITE_APP_URL,
-    changeOrigin: true,
-  } : {
-    target: VITE_APP_URL,
-    changeOrigin: true,
-    rewrite: path => path.replace(/^\/api/, ''),
-  }
-
   // 根据是否生产环境,动态设置压缩配置
   const buildConfig = {
     outDir: 'manage',
@@ -48,9 +39,14 @@
       port: 5174,
       // host: '192.168.1.178',
       proxy: {
-        '/api': mapApi
+        '/api': {
+          target: VITE_APP_URL,
+          changeOrigin: true,
+          rewrite: path => path.replace(/^\/api/, ''),
+        }
       },
     },
+    assetsInclude: ['**/*.gltf'],
     resolve: {
       alias: {
         '~': resolve(__dirname, './'),
@@ -61,6 +57,12 @@
       },
     },
     css: {
+      preprocessorOptions: {
+        scss: {
+          api: 'modern-compiler',
+          additionalData: `@use "@/styles/variables.scss" as *;`,
+        },
+      },
       postcss: {
         plugins: [
           postCssPxToRem({

--
Gitblit v1.9.3