Fix vite server (#3816)

This commit is contained in:
Chris Estreich 2025-05-21 21:39:41 -07:00 committed by hannesrudolph
parent 0b36f477ea
commit be3f46817e
4 changed files with 15 additions and 7 deletions

View file

@ -1,7 +1,8 @@
{
"extends": "@roo-code/config-typescript/base.json",
"compilerOptions": {
"types": ["vitest/globals"]
"types": ["vitest/globals"],
"outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules"]

3
pnpm-lock.yaml generated
View file

@ -625,9 +625,6 @@ importers:
'@jest/globals':
specifier: ^29.7.0
version: 29.7.0
'@roo-code/build':
specifier: workspace:^
version: link:../packages/build
'@roo-code/config-eslint':
specifier: workspace:^
version: link:../packages/config-eslint

View file

@ -8,7 +8,7 @@
"test": "jest -w=40%",
"format": "prettier --write src",
"dev": "vite",
"build": "pnpm --filter @roo-code/build build && tsc -b && vite build",
"build": "tsc -b && vite build",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
@ -76,7 +76,6 @@
"@jest/globals": "^29.7.0",
"@roo-code/config-eslint": "workspace:^",
"@roo-code/config-typescript": "workspace:^",
"@roo-code/build": "workspace:^",
"@storybook/addon-essentials": "^8.5.6",
"@storybook/blocks": "^8.5.6",
"@storybook/react": "^8.5.6",

View file

@ -1,11 +1,22 @@
import path, { resolve } from "path"
import fs from "fs"
import { execSync } from "child_process"
import { defineConfig, type PluginOption, type Plugin } from "vite"
import react from "@vitejs/plugin-react"
import tailwindcss from "@tailwindcss/vite"
import { getGitSha } from "@roo-code/build"
function getGitSha() {
let gitSha: string | undefined = undefined
try {
gitSha = execSync("git rev-parse HEAD").toString().trim()
} catch (_error) {
// NO-OP
}
return gitSha
}
const wasmPlugin = (): Plugin => ({
name: "wasm",