Skip to content

πŸ™Œ OpenHands: AI-Driven Development

818 B
Raw Blame
import { fileURLToPath } from "node:url";
import { defineConfig } from "vite";

// Minimal config so `vite-node` can run the live ACP e2e script outside the
// app's full Vite/React-Router pipeline. We only need the `#/*` β†’ `src/*` path
// alias (the app resolves it via tsconfig-paths, which vite-node doesn't load)
// and to inline the typescript-client so its ESM resolves the same way Vitest
// configures it.
const srcDir = fileURLToPath(new URL("../../../src", import.meta.url));

export default defineConfig({
  define: {
    // Injected by the production Vite config; these scripts load no extension skills.
    __EXTENSIONS_SKILLS_DIR__: JSON.stringify(""),
  },
  resolve: {
    alias: [{ find: /^#\//, replacement: `${srcDir}/` }],
  },
  ssr: {
    noExternal: ["@openhands/typescript-client"],
  },
});