Support VITE_CACHE_DIR environment variable for custom cache directory
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,9 +15,10 @@ import { defineConfig, loadEnv } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd()).VUE_APP_API_URL;
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
|
||||
return{
|
||||
cacheDir: env.VITE_CACHE_DIR || undefined,
|
||||
plugins: [vue()],
|
||||
base: '/',
|
||||
resolve: {
|
||||
@@ -32,7 +33,7 @@ export default defineConfig(({ mode }) => {
|
||||
port: 58249,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: env,
|
||||
target: env.VUE_APP_API_URL,
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, ''),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user