This commit is contained in:
2026-03-21 20:01:37 +08:00
parent bf5f57bc60
commit 21545ccabd
10 changed files with 1563 additions and 2475 deletions

View File

@@ -5,12 +5,11 @@ import sitemap from '@astrojs/sitemap';
import pkgs from './package.json';
import tailwindcss from '@tailwindcss/vite';
import dotenv from 'dotenv';
// import vue from '@astrojs/vue';
dotenv.config();
const isDev = process.env.NODE_ENV === 'development';
const env = dotenv.config().parsed || {};
const isDev = env.NODE_ENV === 'development' || process.env.NODE_ENV === 'development';
let target = process.env.VITE_API_URL || 'http://localhost:51515';
let target = env.VITE_API_URL || process.env.API_URL || 'http://localhost:51515';
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
let proxy = {
'/root/': apiProxy,
@@ -24,7 +23,6 @@ export default defineConfig({
integrations: [
mdx(),
react(), //
// vue(),
// sitemap(), // sitemap must be site has a domain
],
server: {