mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-20 02:03:19 +00:00
feat(factory): finish workbench milestone pass
This commit is contained in:
parent
bf282199b5
commit
49cba9e6c2
137 changed files with 819 additions and 338 deletions
|
|
@ -1,17 +1,31 @@
|
|||
import { fileURLToPath, URL } from "node:url";
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { frontendErrorCollectorVitePlugin } from "@openhandoff/frontend-errors/vite";
|
||||
import { frontendErrorCollectorVitePlugin } from "@sandbox-agent/factory-frontend-errors/vite";
|
||||
|
||||
const backendProxyTarget = process.env.HF_BACKEND_HTTP?.trim() || "http://127.0.0.1:7741";
|
||||
const cacheDir = process.env.HF_VITE_CACHE_DIR?.trim() || undefined;
|
||||
const frontendClientMode = process.env.FACTORY_FRONTEND_CLIENT_MODE?.trim() || "remote";
|
||||
export default defineConfig({
|
||||
define: {
|
||||
"import.meta.env.OPENHANDOFF_FRONTEND_CLIENT_MODE": JSON.stringify(
|
||||
process.env.OPENHANDOFF_FRONTEND_CLIENT_MODE?.trim() || "remote",
|
||||
"import.meta.env.FACTORY_FRONTEND_CLIENT_MODE": JSON.stringify(
|
||||
frontendClientMode,
|
||||
),
|
||||
},
|
||||
plugins: [react(), frontendErrorCollectorVitePlugin()],
|
||||
cacheDir,
|
||||
resolve: {
|
||||
alias: {
|
||||
"@workbench-runtime": fileURLToPath(
|
||||
new URL(
|
||||
frontendClientMode === "mock"
|
||||
? "./src/lib/workbench-runtime.mock.ts"
|
||||
: "./src/lib/workbench-runtime.remote.ts",
|
||||
import.meta.url,
|
||||
),
|
||||
),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 4173,
|
||||
proxy: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue