Skip to content

Commit d86edef

Browse files
committed
Fix vite server
1 parent d5484b5 commit d86edef

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

packages/build/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "@roo-code/config-typescript/base.json",
33
"compilerOptions": {
4-
"types": ["vitest/globals"]
4+
"types": ["vitest/globals"],
5+
"outDir": "dist"
56
},
67
"include": ["src"],
78
"exclude": ["node_modules"]

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test": "jest -w=40%",
99
"format": "prettier --write src",
1010
"dev": "vite",
11-
"build": "pnpm --filter @roo-code/build build && tsc -b && vite build",
11+
"build": "tsc -b && vite build",
1212
"preview": "vite preview",
1313
"storybook": "storybook dev -p 6006",
1414
"build-storybook": "storybook build",
@@ -76,7 +76,6 @@
7676
"@jest/globals": "^29.7.0",
7777
"@roo-code/config-eslint": "workspace:^",
7878
"@roo-code/config-typescript": "workspace:^",
79-
"@roo-code/build": "workspace:^",
8079
"@storybook/addon-essentials": "^8.5.6",
8180
"@storybook/blocks": "^8.5.6",
8281
"@storybook/react": "^8.5.6",

webview-ui/vite.config.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
import path, { resolve } from "path"
22
import fs from "fs"
3+
import { execSync } from "child_process"
34

45
import { defineConfig, type PluginOption, type Plugin } from "vite"
56
import react from "@vitejs/plugin-react"
67
import tailwindcss from "@tailwindcss/vite"
78

8-
import { getGitSha } from "@roo-code/build"
9+
function getGitSha() {
10+
let gitSha: string | undefined = undefined
11+
12+
try {
13+
gitSha = execSync("git rev-parse HEAD").toString().trim()
14+
} catch (_error) {
15+
// NO-OP
16+
}
17+
18+
return gitSha
19+
}
920

1021
const wasmPlugin = (): Plugin => ({
1122
name: "wasm",

0 commit comments

Comments
 (0)