Files
UNITRONIX 6b7b1a242c feat(agent-client): initialize BetterDesk Agent Client with core components and localization support
Created the initial structure for the BetterDesk Agent Client, including essential files such as index.html, package.json, and TypeScript configuration. Implemented core components for the application, including StatusPanel, ChatPanel, and HelpRequest, along with localization support for multiple languages. Added a consent dialog for user permissions and integrated a chat window for real-time communication. Included styling and branding elements to enhance the user interface.
2026-06-20 22:48:18 +02:00

35 lines
1.1 KiB
TypeScript

import { defineConfig } from "vite";
import solidPlugin from "vite-plugin-solid";
import type { Plugin } from "vite";
// WebKitGTK (Linux) does not return CORS headers for the custom tauri://
// protocol, so any resource loaded with the `crossorigin` attribute fails
// silently — CSS is never applied, JS never executes, leaving a blank window.
// Vite adds `crossorigin` automatically on ES-module builds; strip it here.
function removeCrossoriginPlugin(): Plugin {
return {
name: "remove-crossorigin",
transformIndexHtml(html: string) {
return html.replace(/\s+crossorigin(?:="[^"]*")?/g, "");
},
};
}
export default defineConfig({
plugins: [solidPlugin(), removeCrossoriginPlugin()],
clearScreen: false,
server: {
port: 1421,
strictPort: true,
},
envPrefix: ["VITE_", "TAURI_"],
build: {
target: "esnext",
minify: !process.env.TAURI_DEBUG ? "esbuild" : false,
sourcemap: !!process.env.TAURI_DEBUG,
// Disable module-preload polyfill injection — it emits extra
// <link rel="modulepreload" crossorigin> tags that also fail on WebKitGTK.
modulePreload: false,
},
});