Files
nyaterm/vite.config.ts
T
Kang d48a0f8ba4 feat(pane-focus): implement pane focus mode and native fullscreen functionality
- Added state management for pane focus mode and native fullscreen in the App component.
- Introduced keyboard shortcuts to toggle pane focus and native fullscreen.
- Updated the AppLayout and PaneWorkspace components to support the new focus mode, ensuring inactive panes remain mounted but hidden.
- Enhanced the file transfer context to handle RDP events, allowing users to paste files after RDP transfers.
- Added translations for new clipboard options and updated relevant UI components to reflect these changes.
- Improved test coverage for pane focus behavior in the PaneWorkspace component.
2026-09-23 08:59:30 +08:00

69 lines
1.6 KiB
TypeScript

import path from "path";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import browserslist from "browserslist";
import { browserslistToTargets } from "lightningcss";
import { configDefaults } from "vitest/config";
// @ts-expect-error process is a nodejs global
const host = process.env.TAURI_DEV_HOST;
// https://vite.dev/config/
export default defineConfig(async () => ({
plugins: [react(), tailwindcss()],
css: {
transformer: "lightningcss",
lightningcss: {
targets: browserslistToTargets(browserslist("safari >= 14, chrome >= 105")),
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
test: {
environment: "jsdom",
setupFiles: "./src/test/setup.ts",
exclude: [...configDefaults.exclude, "**/src-tauri/vendor/**"],
},
clearScreen: false,
server: {
port: 1420,
strictPort: true,
host: host || false,
hmr: host
? {
protocol: "ws",
host,
port: 1421,
}
: undefined,
watch: {
ignored: ["**/src-tauri/**"],
},
},
build: {
cssMinify: "lightningcss",
rollupOptions: {
output: {
manualChunks: {
react: ["react", "react-dom"],
xterm: [
"@xterm/xterm",
"@xterm/addon-fit",
"@xterm/addon-image",
"@xterm/addon-web-links",
"@xterm/addon-webgl",
"@xterm/addon-search",
],
tauri: ["@tauri-apps/api"],
},
},
},
},
}));