Files
opencode-manager/frontend/vite.config.ts
T
Chris Scott 9d94c333b4 feat: add mobile swipe-back navigation and gestures
- Implement swipe-to-close for mobile modals and dialogs
- Add PageTransition component with push/pop animations
- Create navigation store for managing navigation state
- Add useNavigationDirection hook for animation direction
- Implement useSwipeToClose hook for swipe gestures
- Add prefers-reduced-motion accessibility support
- Create FileBrowserSheet component for mobile file browser
- Add comprehensive tests for swipe behavior and navigation
- Update FileBrowser, Dialog, and BackButton components
- Configure Vite for proper CSS handling
2026-04-15 12:44:33 -04:00

61 lines
1.5 KiB
TypeScript

import path from "path";
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, path.resolve(__dirname, ".."), "");
const backendPort = env.PORT || 5001;
return {
envDir: path.resolve(__dirname, ".."),
plugins: [
react(),
tailwindcss(),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
host: "0.0.0.0",
port: 5173,
allowedHosts: ["argentina-somatopleuric-chauncey.ngrok-free.dev"],
proxy: {
"/api": {
target: `http://localhost:${backendPort}`,
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': 'https://argentina-somatopleuric-chauncey.ngrok-free.dev',
},
},
},
},
build: {
assetsInlineLimit: 4096,
rollupOptions: {
input: {
main: path.resolve(__dirname, "index.html"),
},
output: {
entryFileNames: "assets/[name]-[hash].js",
assetFileNames: (assetInfo) => {
if (assetInfo.name === "manifest.json") {
return "manifest.json";
}
return "assets/[name]-[hash][extname]";
},
},
},
},
worker: {
rollupOptions: {
output: {
entryFileNames: "sw.js",
},
},
},
};
});