mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
pnpm eval drives the production workbench in Chromium against a release openidea-server and real jdtls, judging each scenario (navigation, usages, implementations, gutter markers, lenses, diagnostics, completion, docs, rename) on time to feedback, first and complete result, and checking results against evals/java/golden/. Supporting changes: data-* hooks in the usages popup, hints and rows; a shared in-page Tauri shim for smoke tests and evals; a shared perf bundle builder; language-server versions in .github/tool-versions.env shared with Language smoke; the eval agent skill.
52 lines
1.6 KiB
TypeScript
52 lines
1.6 KiB
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { fileURLToPath } from "node:url";
|
|
import process from "node:process";
|
|
|
|
const host = process.env.TAURI_DEV_HOST;
|
|
|
|
export default defineConfig(() => ({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: [
|
|
{ find: "@", replacement: fileURLToPath(new URL("./src", import.meta.url)) },
|
|
// `invoke` with remote-development routing (src/platform/tauriCore.ts).
|
|
{
|
|
find: /^@tauri-apps\/api\/core$/,
|
|
replacement: fileURLToPath(new URL("./src/platform/tauriCore.ts", import.meta.url)),
|
|
},
|
|
],
|
|
},
|
|
// Tauri: keep Rust errors visible, fixed port, don't watch the backend.
|
|
clearScreen: false,
|
|
server: {
|
|
port: 1420,
|
|
strictPort: true,
|
|
host: host || false,
|
|
hmr: host ? { protocol: "ws", host } : undefined,
|
|
watch: {
|
|
ignored: [
|
|
"**/src-tauri/**",
|
|
"**/crates/**",
|
|
"**/target/**",
|
|
// The packages' sources and builds (not `src/features/plugins`).
|
|
`${fileURLToPath(new URL("./plugins", import.meta.url))}/**`,
|
|
],
|
|
},
|
|
},
|
|
// The app's own entry only: plugins' web pages (`plugins/**/web-src`) are
|
|
// separate projects with their own dependencies, never part of this bundle.
|
|
optimizeDeps: { entries: ["index.html"] },
|
|
build: {
|
|
target: "safari16",
|
|
sourcemap: true,
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: false,
|
|
setupFiles: ["./src/test/setup.ts"],
|
|
include: ["src/**/*.test.{ts,tsx}", "perf/**/*.test.ts", "evals/**/*.test.ts", "scripts/**/*.test.ts"],
|
|
},
|
|
}));
|