Files
hypercross dd08f901ae feat: add inline PDF viewer for Custom_PDF objects
Add a /pdf proxy route that forces Content-Disposition inline so PDFs render instead of downloading, and a web viewer that embeds the document in an iframe with a standalone open-in-new-tab link.
2026-08-14 09:51:11 +08:00

24 lines
703 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { fileURLToPath } from 'node:url';
import { bgm } from '@tts/bgm';
export default defineConfig({
plugins: [
react(),
tailwindcss(),
bgm({ root: fileURLToPath(new URL('../../games', import.meta.url)) }),
],
server: {
// Proxy API calls to the Hono backend during development.
proxy: {
'/search': 'http://localhost:3000',
'/items': 'http://localhost:3000',
'/health': 'http://localhost:3000',
'/asset': 'http://localhost:3000',
'/pdf': 'http://localhost:3000',
'/trace': 'http://localhost:3000',
},
},
});