From 8ac5f9dfa0bf5b679dfea090a47c8146ee3d0e3c Mon Sep 17 00:00:00 2001
From: 李 <344137771@qq.com>
Date: Tue, 26 May 2026 09:46:16 +0800
Subject: [PATCH] 1

---
 vite.config.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/vite.config.js b/vite.config.js
index 0f9037d..5f0dfd3 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -7,6 +7,7 @@
 import { visualizer } from 'rollup-plugin-visualizer'
 import legacy from '@vitejs/plugin-legacy';
 
+const scss_path = `@/assets/theme/index.scss`
 const isVisualizer = process.env.VISUALIZER === 'show'
 export default defineConfig({
   base: '',  //H5打包用
@@ -26,6 +27,7 @@
     preprocessorOptions: {
       scss: {
         additionalData: `@import "@/assets/css/variable.scss";`
+        // additionalData: `@import "@/assets/css/variable.scss";@import "${scss_path}";`
       },
     }
   },
@@ -42,6 +44,12 @@
         // rewrite: (path) => path.replace(/^\/wap/, ""),
         secure: false
       },
+      "/newsapi-api": {
+        target: "https://newsapi.org",
+        changeOrigin: true,
+        rewrite: (path) => path.replace(/^\/newsapi-api/, ''),
+        secure: true
+      },
     },
   },
   resolve: {

--
Gitblit v1.9.3