Files
open-design/vite.config.ts
Tom Huang 6f6bf31dd2 Refactor project name from "Open Claude Design" to "Open Design" (#1)
* Refactor project name from "Open Claude Design" to "Open Design"

- Updated project name in package.json, package-lock.json, and README files.
- Changed CLI commands and references from "ocd" to "od".
- Adjusted file structure references in documentation and code to reflect new naming conventions.
- Enhanced .gitignore to include new runtime data files.
- Updated metadata in LICENSE file to match new project name.

* Add contributing guidelines in English and Chinese

- Introduced CONTRIBUTING.md and CONTRIBUTING.zh-CN.md to provide clear instructions for contributors.
- Outlined contribution types, local setup instructions, and merging criteria for skills and design systems.
- Enhanced README files to reference the new contributing guidelines.
2026-04-28 16:03:35 +08:00

35 lines
1004 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
const DAEMON_PORT = Number(process.env.OD_PORT) || 7456;
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
'/api': {
target: `http://127.0.0.1:${DAEMON_PORT}`,
changeOrigin: true,
// Daemon uses SSE on /api/chat — disable Vite's buffering.
configure: (proxy) => {
proxy.on('proxyRes', (proxyRes) => {
proxyRes.headers['cache-control'] = 'no-cache, no-transform';
});
},
},
// The daemon serves persisted artifacts and the shared device-frame
// library; proxy them through so the dev SPA can iframe them without
// hitting a different origin.
'/artifacts': {
target: `http://127.0.0.1:${DAEMON_PORT}`,
changeOrigin: true,
},
'/frames': {
target: `http://127.0.0.1:${DAEMON_PORT}`,
changeOrigin: true,
},
},
},
});