Files
light-code/web/astro.config.mjs
abearxiong 4407c6157f feat: update dependencies and add video-tools package
- Added "@kevisual/video-tools" dependency to server/package.json.
- Updated VITE_API_URL in astro.config.mjs to point to new local server.
- Modified proxy settings in astro.config.mjs to include WebSocket support.
- Updated various dependencies in web/package.json for improved functionality and security.
- Refactored MuseApp component to use new resizable panel components.
- Implemented real-time text display and copy functionality in VadVoice component.
- Created a new Relatime class for handling WebSocket connections and real-time updates.
- Added new board and muse pages to render the Record component.
2025-12-23 00:40:52 +08:00

44 lines
1016 B
JavaScript

import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import react from '@astrojs/react';
import sitemap from '@astrojs/sitemap';
import pkgs from './package.json';
import tailwindcss from '@tailwindcss/vite';
const isDev = process.env.NODE_ENV === 'development';
let target = process.env.VITE_API_URL || 'http://localhost:51015';
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
let proxy = {
'/root': apiProxy,
'/api': apiProxy,
'/ws': apiProxy,
};
const basename = isDev ? undefined : `${pkgs.basename}`;
export default defineConfig({
base: basename,
integrations: [
mdx(),
react(), //
// sitemap(), // sitemap must be site has a domain
],
server: {
port: 4321,
host: '0.0.0.0',
allowedHosts: true,
},
vite: {
plugins: [tailwindcss()],
define: {
basename: JSON.stringify(basename || ''),
},
server: {
proxy,
},
},
});